On Thu, 27 Oct 2011 16:09:49 -0500, Kirk Wolf wrote:
>
>PS> consider using awk to build job to do the whole thing in a pipeline
>without temp files.
>*Something* like:
>
Hardly any need for awk. sh can do much the same (untested):
catsearch cicsts*.** |
cut -d '.' -f 2- |
sort -u |
while read name; do cat <<end-of-job
//JOBNAME JOB (ACCT),PGMR,CLASS=A,MSGCLASS=H
//IDCAMS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE ALIAS(NAME(CICSTS.$Name) -
SYMBOLICRELATE(&CICSVER..$Name))
//
end-of-job
done |
submit -j
(sh does not require '\' after '|' and awk does not require ';' at end of line.)
(But this ignores the fact that sh _probably_ writes here-documents to temp
file and reads them back.)
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html