I call this WRITEDSP. It counts the records, finds the longest one, then
allocates a VB dataset big enough. Since it buffers the output it does slow
things slightly and can blow up through lack of memory. However this is so rare
that I used to save more time than I ever lost:
/**/
arg dsname .
'callpipe (separ | end \)',
'|*:',
'|cl:count lines', /* count the lines */
'|cm:count maxline', /* how long are they */
'|buffer', /* hold them somewhere */
'|d:drop *', /* divert them to pipcmd */
'\cl:', /* This does the alloc */
'|strnfind /0/', /* Don't build empty ds */
'|sp:spec a: 1-* . select 1 b: 1-* . set #0:=b+4;#1:=a%(32760%#0)+1',
'}callpipe (separ ! end $)',
'!literal ALLOC DS('DSNAME') SPACE(} n',
'print #1 pic zzzzzzzz strip n },10) BLOCK(32760)',
'LRECL(} n print #0 pic zzzzzzzz strip n',
'}) RECFM(V B)} n',
'}!TSO} n write',
'}callpipe (separ ! end $)',
'!literal FREE DS('DSNAME')',
'!TSO} n write',
'}callpipe (separ ! end $) *..1:', /* This fills the */
'!> 'DSNAME'!*:} n', /* dataset */
'|p:pipcmd',
'|*:',
'\cm:',
'|sp:',
'\d:',
'|p:'
exit
Regards
Paul Lautman
Telephone: (Int) 7873119 (ext) 023 8037 3119
-----Original Message-----
From: CMSTSO Pipelines Discussion List [mailto:[email protected]] On
Behalf Of Glenn Knickerbocker
Sent: 19 October 2011 17:38
To: [email protected]
Subject: [CMS-PIPELINES] new data set stage; MVS REXX trace weirdness
I finally got fed up enough with the extra step of allocating a new data set to
write myself a front-end to >MVS to do it for me. Before I go any further with
figuring out how much more function I might want in it, has anybody done this
already?
If not, any recommendations for useful defaults? I picked RECFM(V,B)
LRECL(32756) BLKSIZE(32760) SPACE(10,100) CYL.
In checking for existence of the data set, I ran into an oddity with the REXX
TRACE setting. With TRACE N, I get trace output not just when the return code
is negative, but also when it's > 12. Any idea what's going on here? I poked
through the TSO REXX books looking for anything special about TRACE in the MVS
address space, but only found a note about messages in the output file in MVS
batch.
¬R
Aviva is the trading name for the principal subsidiaries of the
Aviva Group in the United Kingdom. The principal subsidiaries are:
Aviva Insurance UK Limited.
Registered Office 8 Surrey Street, Norwich, Norfolk NR1 3NG.
Registered in England Number 99122.
Authorised and regulated by the Financial Services Authority.
Aviva Life Services UK Limited.
Registered Office 2 Rougier Street, York YO90 1UU.
Registered in England Number 2403746.
Authorised and regulated by the Financial Services Authority.
Aviva Health UK Limited.
Registered Office 8 Surrey Street, Norwich, Norfolk NR1 3NG.
Registered in England Number 2464270.
Authorised and regulated by the Financial Services Authority.
**********************************************************************
This email and any files sent with it are intended only for the named
recipient. If you are not the named recipient please telephone/email
the sender immediately. You should not disclose the content or
take/retain/distribute any copies.
**********************************************************************