11.01.2013 Views

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The automatic class selection (ACS) routines (established by your storage administrator) and<br />

the associated SMS classes eliminate the need to use many access method services<br />

command parameters. The SMS environment is discussed in more detail in Chapter 5,<br />

“<strong>System</strong>-managed storage” on page 239.<br />

Invoking the IDCAMS utility program<br />

When you want to use an access method services function, enter a command and specify its<br />

parameters. Your request is decoded one command at a time; the appropriate functional<br />

routines perform all services required by that command.<br />

You can call the access method services program in the following ways:<br />

► As a job or jobstep<br />

► From a TSO session<br />

► From within your own program<br />

TSO users can run access method services functional commands from a TSO session as<br />

though they were TSO commands.<br />

For more information, refer to “Invoking Access Method Services from Your Program” in z/<strong>OS</strong><br />

DFSMS Access Method Services for Catalogs, SC26-7394.<br />

As a job or jobstep<br />

You can use JCL statements to call access method services. PGM=IDCAMS identifies the<br />

access method services program, as shown in Figure 4-21.<br />

//YOURJOB JOB YOUR INSTALLATION'S JOB=ACCOUNTING DATA<br />

//STEP1 EXEC PGM=IDCAMS<br />

//SYSPRINT DD SYSOUT=A<br />

//SYSIN DD *<br />

/*<br />

access method services commands and their parameters<br />

Figure 4-21 JCL statements to call IDCAMS<br />

From a TSO session<br />

You can use TSO with VSAM and access method services to:<br />

► Run access method services commands<br />

► Run a program to call access method services<br />

Each time you enter an access method services command as a TSO command, TSO builds<br />

the appropriate interface information and calls access method services. You can enter one<br />

command at a time. Access method services processes the command completely before<br />

TSO lets you continue processing. Except for ALLOCATE, all the access method services<br />

functional commands are supported in a TSO environment.<br />

To use IDCAMS and certain <strong>of</strong> its parameters from TSO/E, you must update the IKJTSOxx<br />

member <strong>of</strong> SYS1.PARMLIB. Add IDCAMS to the list <strong>of</strong> authorized programs (AUTHPGM). For<br />

more information, see z/<strong>OS</strong> DFSMS Access Method Services for Catalogs, SC26-7394.<br />

From within your own program<br />

You can also call the IDCAMS program from within another program and pass the command<br />

and its parameters to the IDCAMS program.<br />

130 <strong>ABCs</strong> <strong>of</strong> z/<strong>OS</strong> <strong>System</strong> <strong>Programming</strong> <strong>Volume</strong> 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!