On Fri, Jan 17, 2014 at 7:12 AM, van der Grijn, Bart (B) < bvandergr...@dow.com> wrote:
> I'm trying to use pax to write to a ddname. I'm doing this from a REXX > exec that's running in batch under IKJEFT01. I'm not getting it to work. > > The following code: > ... > wCMD = "pax -w -X -z -x pax -f //DD:PAX" aDir > "ALLOC DD(PAX) DSN('"aBackupDsn"') OLD release" > paxRC = bpxwunix(wCMD,,stdout.,stderr.) > do line# = 1 to stderr.0 > say stderr.line# > End > "FREE DD(PAX)" > ... > > Results in > pax: //DD:PAX: EDC5037I The specified ddname was not found. > > I assume this is because the default _BPX_SHAREAS setting causes the pax > command to run in a different address space, without access to the DDNAME > (I did run a version of the code with a LISTA STATUS to verify the dataset > was allocated to the DDNAME). > I can't figure out how to override this setting for my IKJEFT01 step. > > Any thoughts, or other ideas how to write the pax output to a ddname? > (I also tried it by specifying a ddname in the bpxwunix call instead of > the stdout., but got a truncation error. I suspect that's because it > exceeded the 2048 limit) > > Thanks, > Bart Close, but no cigar. Reading up on the bpxunix() REXX function, it states that STDIN, STDOUT, and/or STDERR _may_ be assigned to a DD name. Reading up on the pax command, you will find out that pax will write the archive out to "stdout" unless told differently. Combining theses two observations, I think you can make a single change to your REXX program paxRC=bpxwunix(wCMD,,"DD:PAX",stderr.) I have never done this, but it can't hurt to try. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN