SARSAM7

SARSAM7 is a demonstration program that shows you how to use the
View
Database Access Method (SARSAM) to retrieve information from the database. This sample can search the database and can find specific index entries and build /PRINT control cards. The /PRINT are used as input to SARBCH to print the information found during the search.
view
SARSAM7 is a demonstration program that shows you how to use the
View
Database Access Method (SARSAM) to retrieve information from the database. This sample can search the database and can find specific index entries and build /PRINT control cards. The /PRINT are used as input to SARBCH to print the information found during the search.
This is a useful batch program to locate index information in the database when there is no online access to
View
. This batch program provides the same function as the cross-index searching function:
CA View ALL -- Primary Selection for VIEW.SYSTEM1 -------------------------- Command ===> DEFINE VIEW Sysout ID ===> * Select By ===> I (R, I, IL, or IR) Index Name ===> ACCT Value ===> 12345 ===> ===> ===> ===> ===> ===> Selection Criteria: Generation ===> * (*, ALL, specific (n), relative (-n), range (n:m or -n:m)) Date ===> (specific (mm/dd/yyyy), relative (-n), range(mm/dd/yyyy:mm/dd/yyyy or -n:m)) Selection Options: Only specify to restrict selection Exceptions ===> X exceptions only, NX non exceptions only, AX/(blank) any Permanent ===> P permanent only, NP non permanent only, AP/(blank) any Enter END command to terminate this CA View session.
The following job control statements are required to execute SARSAM7:
  • JOB
    Initiates the job.
  • EXEC
    Specifies the program name (PGM=SARIDXS) and the high-level name of the product database. (PARM='VIEW.SYSTEM1').
  • STEPLIB DD
    Defines the load library containing SARIDXS. If the program resides in a link list library, omit this statement.
  • SYSUT1 DD
    Control card input for SARBCH is written to this dataset. /PRINT control cards are built to print the report data found by the search.
    This dataset has the following JCL attributes:
    • RECFM=FB
    • LRECL=80
  • SYSIN DD
    Defines a card image data set that contains the control statements that are used for input.
JCL Requirements:
Use the following statements:
//STEP1 EXEC PGM=SARIDXS,PARM='db_hlq' //STEPLIB DD DSN=CAI.CVDELOAD,DISP=SHR //SYSUT1 DD DSN=...control.cards.sarbch...,DISP=(,CATLG), // UNIT=SYSDA, SPACE=(TRK,(10,1)),STORCLAS=? //SYSIN DD * Control Cards /* PARM='db_hlq'
where:
  • db_hlq
    Defines the high-level name of the product database.
Control Cards:
/DBASE NAME=databasename /PRINT INDEX=xxxxxxxx SELECT=xxxxxxxx
where:
  • NAME=databasename
    Defines the high-level name of the product database. This /DBASE control card is also written to the SYSUT1 output as well as switching the database used for the search.
  • /PRINT
    Defines that /PRINT starts a search. Multiple /PRINT can appear in an execution. Each produces a new set of search results.
  • INDEX=xxxxxxxx
    Specifies the index value associated with this print request.
  • SELECT=xxxxxxxx 
    Specifies the page separation index value for selecting pages to print.
    If the value contains any of the special characters: blank, comma, or single quote, enclose the index value within single quotes. Represent a single quote as two single quotes.
Sample Assembly and Linkage Editor JCL:
//ASM1 EXEC PGM=ASMA90,PARM=('NODECK,OBJECT') //SYSPRINT DD SYSOUT=* //SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(5,5)) //SYSUT2 DD UNIT=SYSDA,SPACE=(TRK,(5,5)) //SYSUT3 DD UNIT=SYSDA,SPACE=(TRK,(5,5)) //SYSLIN DD DSN=&&OBJ,DISP=(,PASS),SPACE=(CYL,(1,1)),UNIT=SYSDA //SYSLIB DD DISP=SHR,DSN=SYS1.MACLIB // DD DISP=SHR,DSN=...................CVDEMAC //SYSIN DD *
Insert source here
/* //LKED EXEC PGM=IEWL,PARM='XREF,LIST,NCAL' //SYSLMOD DD DISP=SHR,DSN=....................CVDELOAD //SYSPRINT DD SYSOUT=* //CVDELOAD DD DISP=SHR,DSN=....................CVDELOAD //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(2,1)) //SYSLIN DD DSN=&&OBJ,DISP=(OLD,DELETE) // DD * INCLUDE CVDELOAD(SARSAM) ENTRY SARIDXS NAME SARIDXS(R) /*