I think you need to do a:

call bpxwdyn "alloc fi(pax) DSN('"aBackupDsn"') OLD release"


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of van der Grijn, Bart (B)
Sent: Friday, January 17, 2014 8:12 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: pax, ddnames and _BPX_SHAREAS

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


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to