MVS CP Command Module

Assemble and link the MVSCPCMD ASSEMBLE file into an APF authorized library. The program can run as a started task to issue CP commands from the MVS console or as a TSO command. 

All the macros used are in 'SYS1.MACLIB' so the standard catalogued procedure ASMACL should be all that is required. The link edit step must specify PARM='AC=1' or provide a SETCODE AC(1) tatement as input to the link edit in order to mark the MVSCPCMD as authorized. The output from the link edit (binder) step is in the data set pointed to by the SYSLMOD DD card. This must be an authorized library. If it is not an authorized library, then the system programmer can copy it into one. Any of the libraries in LINKLIST can be used but the system programmer should choose some library reserved for customer programs. 

Here is sample JCL that was used to link the program into a user library. 

//NNNNNNN JOB (1234,567890),'AAAA',MSGLEVEL=(1,1),NOTIFY=NNNNNNN, 
// MSGCLASS=X,TIME=(,30),CLASS=D 
//*MAIN LINES=(10,W) 
//MVSCPCMD EXEC ASMACL 
//C.SYSIN DD DSN=NNNNNNN.TEST.ASM(MVSCPCMD),DISP=SHR 
//L.SYSLMOD DD DSN=NNNNNNN.TEST.LOAD,DISP=SHR 
//L.SYSIN DD * 
   SETCODE AC(1) 
   NAME MVSCPCMD(R)

To execute MVSCPCMD, in batch z/OS JCL enter:

//STEPNAME EXEC PGM=MVSCPCMD,PARM='some CP command here'

3 comments:

  1. You are welcome. This code has been around for a long time (written by my team mate Tom Russell). Good to see it still works!

    ReplyDelete
  2. Hey Jim, this is super useful. Our VSE Sysprogs are spoiled with the * CP command interface so this provides a nice equivalent in our MVS environments. Thanks for your work!

    ReplyDelete
  3. This is really very informative, thanks for sharing also visit: .Net Training in Toronto

    ReplyDelete