CONSAMS - Execute IDCAMS Commands from Console

CONSAMS provides an operator console interface to Access Method Services (IDCAMS). 

It is located in File #65 of the CBT overflow tape and is part of a collection from the Los Angeles User Group tape.


The jobstream to assemble, and link-edit the executable, and install JCL to run the command as a Started task - consams$.jcl - is contained in the archive [MD5: 0D750E4599B1268DA2099F55C1CD2081].  This jobstream contains the source for CONSAMS plus two required macros, QEDIT and REGEQU, which I have copied verbatim from the associated CBT file #63 in front of the source.  No changes are required to successfully assemble and link the load module using the IFOX00 assembler.  CONSAMS must reside in an authorized library in order to execute certain IDCAMS commands, however the majority of commands do not require authorization.  The jobstream as supplied will link-edit the load module into SYS2.LINKLIB, which is an authorized library on my system.  The jobstream also installs a simple PROCedure to execute the load module from the system console as a started task.  

Download the archive and extract the jobstream (WinZip on Windows/?? or tar on Linux).  This jobstream and the archive were created under Windows, so each line in the text file is terminated by x'0d0a', so if you are installing on Linux you will need to strip the x'0d' using a utility such as fromdos.  Submit the jobstream to assemble and link the single load module for CONSAMS into SYS2.LINKLIB and copy the JCL into SYS2.PROCLIB.  If you don't have SYS2.LINKLIB defined, you will need to modify the jobstream to specify a different target load library.  Also if you do not have SYS2.PROCLIB defined, you may modify the jobstream to place the JCL into SYS1.PROCLIB.


Utilizing CONSAMS

From the system console, you can start a task to call the load module using the supplied procedure:

s ams 

CONSAMS will respond with the message:  AMS READY.

To enter and IDCAMS command, use the operator modify command:

f ams,IDCAMS command

CONSAMS will pass the IDCAMS command text to IDCAMS as a SYSIN record.  IDCAMS will then respond with SYSPRINT records which CONSAMS will write via WTO to the console which entered the modify command.  A one second delay is imposed on consecutive WTO's to prevent excessive queued console output.

To stop CONSAMS, when it is waiting for a modify command, enter the command:

p ams 

The following console log image illustrates CONSAMS utilized to Verify a VSAM cluster:

A SYSOUT DD statement is provided in the supplied Procedure to facilitate the use of the OUTFILE parameter of some IDCAMS commands for hard copy output which is too voluminous for output to the console.  The following console log image illustrates CONSAMS utilized to Print the contents of a VSAM cluster to the SYSOUT DD.

In the Procedure supplied, the output class for all DD statements is Y, which is a held class on my system.  You may change these to suit your own system and preferences.

I hope that you have found my instructions useful.  If you have questions that I can answer to help expand upon my explanations and examples shown here, please don't hesitate to send them to me:

Return to Site Home Page 

This page was last updated on January 17, 2015 .