This example calls cawto from within a script:
//EXPAND EXEC PGM=BPXBATCH,REGION=0M, // PARM='PGM /cai/nsmem/bin/myscript Hi from a script file' //STDOUT DD PATH='/cai/nsmem/RW/batch.out', // PATHOPTS=(OWRONLY,OCREAT,OTRUNC), // PATHMODE=(SIRUSR,SIWUSR,SIRGRP,SIWGRP,SIROTH) //STDERR DD PATH='/cai/nsmem/RW/batch.err', // PATHOPTS=(OWRONLY,OCREAT,OTRUNC), // PATHMODE=(SIRUSR,SIWUSR,SIRGRP,SIWGRP,SIROTH) //STDENV DD PATH='/cai/nsmem/RW/ENVFILE', // PATHOPTS=(ORDONLY) /* //*
The file myscript can do the following action:
#Change to our directory cd /cai/nsmem # Set the environment variables . PROFILE # Take the parm passed as the message to be sent cawto $1 # Send a copy of the command to the console logger message $1 sent
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|