Shane,

Its always best not to copy the files at all if you don't need to.
Using our free BPXBATCH replacement, it is trivial to use DDs in Unix
shell scripts.

For your example:

//LC  EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD *
 LISTCAT ... OFILE(LC1)
 LISTCAT ... OFILE(LC2)
//LC1       DD DSN=&LC1,DISP=(NEW,PASS),SPACE=(CYL,(3,3)),
//             DCB=(RECFM=VB,LRECL=137)
//LC2       DD DSN=&LC2,DISP=(NEW,PASS),SPACE=(CYL,(3,3)),
//             DCB=(RECFM=VB,LRECL=137)
//*
//* Run the user's login shell with input from //STDIN
//EX1 EXEC PGM=COZBATCH
//LC1       DD DSN=&LC1,DISP=(OLD,DELETE)
//LC2       DD DSN=&LC2,DISP=(OLD,DELETE)
//STDIN     DD *
 diff //DD:LC1 //DD:LC2 |
 awk '
    {arbitrarily long awk script}
 '
//


Kirk Wolf
Dovetailed Technologies
http://dovetail.com/products/cozbatch.html

On Fri, Apr 30, 2010 at 5:46 AM, Shane Ginnane <ibm-m...@tpg.com.au> wrote:
> Ran into an oddball today.
>
> Needed to quickly diff a couple of z/OS catalogs, and figured it'd be easier 
> using awk/diff than knocking up
> some REXX. So I ran LISTCAT and from SDSF XDC'd the sysprint. Pulled that 
> over to OMVS to play with,
> couple of lines of awk, job done - DEF ALIAS for each difference in a file to 
> use as SYSIN for IDCAMS
> again.
> Easy.
>
> Decided I needed a standard job to do it all, so used OFILE in the LISTCAT 
> job to generate the listings
> into files. Even added DCB of VB, 140 just to be sure. IDCAMS  forces VBA, 
> which I didn't pick up on
> until later. Same script with those (erstwhile) VBA files fails due to every 
> line that has a page skip control
> (char "1" in column 1) being appended to the previous line. No line feed.
> A GENER of the files to VB prior to sending them to OMVS indeed confirmed 
> this is what was happening.
>
> Anyone else seen this - or got an explanation ?. gil maybe ... ?
>
> Shane ...
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to