Module 3: Access Method Services (AMS)
- IDCAMS stands for Integrated Data Cluster Access Method Services
- AMS uses the IDCAMS utility to implement all functions on VSAM or non-VSAM objects. This utility can be executed via JCL like any other IBM supplied program.
- IDCAMS can execute various functional command coded on the SYSIN DD statement. It also allows executing of multiple functional commands in the same Job. Multiple AMS job steps is also allowed within a job.
- It can be used in the following three ways:-
- In batch JCL
- Calls from application program
- In real time - through TSO commands
- Figure below depicts important functional commands of IDCAMS utility:-
- The basic JCL to run the IDCAMS utility is:-
//jobName JOB (acct-info),'programmer-name' //stepName EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * AMS-commands /*
In above code snippet:-
- Job statement is the first statement for specifying Job details
- EXEC statement to indicates IDCAMS utility will be executed
- SYSPRINT specifies the location where the IDCAMS logs messages will be printed. In above case, we specified SYSPRINT=* which will print IDCAMS logs into Spool.
- SYSIN used to input AMS commands that are to be implemented by IDCAMS
- Important consideration while coding IDCAMS SYSIN commands:-
- If the command does not fit in one line, Command continuation is allowed on next line by coding a hyphen (-) as the last character in the line
- A parameter and a sub parameter cannot be separated with hyphen (-). A plus sign (+) should be used for this purpose
- Allowed to code multiple commands within one job step. However, each command must be coded on separate lines
- Minimum one blank space must be there between the command and the object and between sub parameter value
- A space or a comma can be used to separate sub-parameter values
- Comments can be included in SYSIN section by writing them between a /* and */. The /* can be coded only after column position 1
- Space is optional between a parameter and the parenthesis enclosing it’s values
- Allowed to code multiple parameters on a line but for better readability it is suggested to place each on a separate line
- In IDCAMS utility commands, keyword ‘DATASET’ refers to actual physical dataset (Example: ‘MUSER.NEW.DATA’) and keyword ‘FILE’ refers to DDNAME coded in JCL (not actual Dataset) and it is logical.