Looking for example of dynamic allocation of SYSOUT pipe

Discussion of Dovetailed Technologies Dataset Pipes tools
Post Reply
sctebnt
Posts: 30
Joined: Mon Nov 02, 2009 10:47 pm

Looking for example of dynamic allocation of SYSOUT pipe

Post by sctebnt » Mon Nov 02, 2009 10:59 pm

I am trying to dynamically allocate a SYSOUT fileref using TODSN.

When I run the following:

cat $FILELST \
| todsn -L e -x 'alloc DD(MYDATA) sysout(S) recfm(VB) LRECL(133)' \
//SYSOUT &

I get this error:

cozserver(6): command: todsn '-L' 'e' '-x' 'alloc DD(MYDATA) sysout(S) recfm(
cozserver(6)[D]: CoZServer path: /apps/coz/current/bin:.
cozserver(6)[D]: CoZServer libpath: /apps/coz/current/bin:.
cozserver(6)[D]: arg[0] = 'todsn'
cozserver(5)[D]: fd_map[0] = 0
cozserver(6)[D]: arg[1] = '-L'
cozserver(5)[D]: fd_map[1] = 4
cozserver(6)[D]: arg[2] = 'e'
cozserver(5)[D]: fd_map[2] = 2
cozserver(6)[D]: arg[3] = '-x'
cozserver(5)[D]: fd_map[3] = 6
cozserver(6)[D]: arg[4] = 'alloc DD(MYDATA) sysout(S) recfm(VB) LRECL(133)'
cozserver(6)[D]: arg[5] = '//SYSOUT'
cozserver(6)[D]: fd_map[0] = 0
cozserver(6)[D]: fd_map[1] = 4
cozserver(6)[D]: fd_map[2] = 2
cozserver(6)[D]: fd_map[3] = 6
cozserver(5)[D]: Started "todsn", pid=17435117
cozserver(6)[D]: Started "todsn", pid=658713
todsn: version: 1.3.2 2009-07-14
todsn: Copyright (C) Dovetailed Technologies, LLC. 2006. All rights reserved.
todsn[D]: <0> sourceCodePage defaulted to COZ_CLIENT_CODEPAGE=ISO8859-1
todsn: version: 1.3.2 2009-07-14
todsn: Copyright (C) Dovetailed Technologies, LLC. 2006. All rights reserved.
todsn(DD:SASLOG)[N]: <0> srcCr: 0x0d srcLf: 0x0a srcNl: 0x0a
todsn[W]: DatasetHandler: <0> prohibited BPXWDYN alloc keyword was ignored: "DD"
todsn[D]: <0> sourceCodePage defaulted to COZ_CLIENT_CODEPAGE=ISO8859-1
todsn(SYSOUT)[N]: <0> srcCr: 0x0d srcLf: 0x0a srcNl: 0x0a
todsn(DD:SASLOG): <0> opts=wb,type=record,noseek,recfm=* maxreclen=251 recfmF
cozserver(5)[D]: relaying error_status packet from FD_ERRPT: rc=0, errno=0, errn

I need to be able to define a TODSN dynamically for SYSOUT files that will not exist in the JCL of my COZLNCH program. I need to specify the DD Name used by the dynamic sysout and need to specify the properties.

Any help is appreciated.

dovetail
Site Admin
Posts: 1850
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail » Tue Nov 03, 2009 8:56 am

When you use the "-x" option you can specify most of the BPXWDYN keywords, but you don't specify "alloc" or ddname. Try this:

cat $FILELST \
| todsn -L e -x 'sysout(S) recfm(V,B) lrecl(133) spin(unalloc)' //SYSOUT


Note that BPXWDYN requires that the recfm keyword have the values comma separated. Also, the spin(unalloc) keyword will allow the print file to be available to be immediately processed after the file is complete.

sctebnt
Posts: 30
Joined: Mon Nov 02, 2009 10:47 pm

Post by sctebnt » Tue Nov 03, 2009 10:19 am

Thanks the syntax you provided does define a dynamic SYSOUT for my job to use but the command results in a system generated DDNAME.

I need to also have the dynamic sysout be defined with a specific DDNAME. Is there a supported option that will allow me to specify the ddname to use?

dovetail
Site Admin
Posts: 1850
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail » Tue Nov 03, 2009 10:42 am

Sorry, there is currently not a way for todsn to use a specific DDNAME. Why would you need a specific name?

sctebnt
Posts: 30
Joined: Mon Nov 02, 2009 10:47 pm

Post by sctebnt » Tue Nov 03, 2009 10:58 am

I am looking into moving SAS code from Z/OS to Unix distributed. In this SAS we have code (FILENAME statement) to dynamically define SYSOUTs for reports. Our users, documentation and output processing tools expect the output to be in specifically named DDs. Having the system generated DD names will make it difficult for our users to support the batch jobs and will require significant modification to our output processing tools (Control-D).

dovetail
Site Admin
Posts: 1850
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail » Tue Nov 03, 2009 11:30 am

I understand. I guess we never considered that using a specific DDNAME would be important. We will consider adding support for this in a future release.

Have you considered preallocating the DD in the job's JCL? You could then just have:

cat $FILELST \
| todsn //DD:OUTPUT

dovetail
Site Admin
Posts: 1850
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail » Tue Nov 17, 2009 4:30 pm

We have added support in Co:Z 1.5.0 for specifying the dynamically allocated DDNAME in the todsn command.

For example:

cat /etc/profile |
todsn -x "dd(mydd) recfm(v,b) lrecl(133) sysout(b) spin(unalloc)" //SYSOUT


Thank you for your suggestion.

tsdjim
Posts: 64
Joined: Fri May 07, 2010 2:21 am

Re: Looking for example of dynamic allocation of SYSOUT pipe

Post by tsdjim » Wed Jan 16, 2013 11:36 am

I need to send a Linux file to a dynamically allocated DD SYSOUT and I tried to following syntax taken from this forum, however I get a rc=103 BPXWDYN parameter error. Is my syntax correct:

todsn -x "dd(SYSOUT) recfm(F) lrecl(133) sysout(x) spin(unalloc)" //SYSOUT < /file/name

I have the latest version of the CO:Z toolkit.

dovetail
Site Admin
Posts: 1850
Joined: Thu Jul 29, 2004 12:12 pm

Re: Looking for example of dynamic allocation of SYSOUT pipe

Post by dovetail » Wed Jan 16, 2013 12:32 pm

It works for me:

todsn -x "dd(SYSOUT) recfm(f) lrecl(133) sysout(x) spin(unalloc)" //SYSOUT < /etc/profile
todsn(SYSOUT)[N]: 10248 bytes read; 246 records/32718 bytes written in 0 milliseconds.

Could it be that DD SYSOUT is already allocated?
If you get a BPXWDYN error, don't you get any messages?

tsdjim
Posts: 64
Joined: Fri May 07, 2010 2:21 am

Re: Looking for example of dynamic allocation of SYSOUT pipe

Post by tsdjim » Thu Jan 17, 2013 10:52 am

It works just fine, just had some extra characters which I did not see. Thanks

Post Reply