JCL Session 6


AMS -- Access Method Services A program that performs miscellaneous tasks


JCL to invoke AMS
 

//stepname EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=* <--prints SYSIN input plus results of AMS processing
//SYSIN     DD * <--points to dataset containing AMS input commands
        (AMS COMMANDS)



AMS Command Format

verb parameters     - anywhere in columns 2 through 72
                                 - use hyphens to continue a command to next line
                                - comments begin with /* and end with */



Sample list of some AMS Command Verbs
 

Details on the PRINT command


PRINT

Details on the REPRO command


REPRO  

Example DELETE command. Other examples are in Supplementary Materials.


//JPETLICK JOB XX,'PETLICKI',MSGCLASS=X,MSGLEVEL=(1,1)
//DELEMEM  EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD *
  DELETE JPETLIC.CSC.CNTL(GRADES4)
/*



Example ALTER command. Other examples are in Supplementary Materials.


//JPETLICK JOB XX,'PETLICKI',MSGCLASS=X,MSGLEVEL=(1,1)
//DELEMEM  EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD *
  ALTER JPETLIC.CSC.CNTL(GRADES5)
  NEWNAME (JPETLIC.CSC.CNTL(SAMPLE))
/*



EXERCISE Use IDCAMS (Value 15 points)

In one job, use IDCAMS in multiple steps to do the following:

  1. Print the first 5 records (and 5 records only) of JPETLIC.CSC.CNTL(GRADES)
  2. REPRO a copy of the 10th thru 20th records of JPETLIC.CSC.CNTL(GRADES) in your CCP#nn.CCP.PDS as member GRADES11.
  3. Print all of GRADES11 using IDCAM.
  4. Rename GRADES11 to MYGRADES.
Correct assignments will only have return codes of 0000.
Avoid NOT CATLG 2 problems