On Tue, 26 Jan 2021 19:32:08 +0000, Frank Swarbrick wrote: >I don't think reusing the DD would be appropriate, since cob2 directs SYSPRINT >to a Unix file, not the terminal. >Your suggestion would probably work. Thanks for the thought. > In days of yore, IIRC REUS was mutually exclusive with PATH. But that has been fixed, perhaps only in BPXWDYN by doing a FREE before the ALLOCATE.
>________________________________ >From: Farley, Peter x23353 >Sent: Tuesday, January 26, 2021 12:27 PM > >It might be as simple as the DYNALLOC in cob2 is not using the REUSE parameter >to reuse an existing DD. You could also simply wrap the invocation of cob2 >with a TSO "FREE FI(SYSPRINT)" and after cob2 "ALLOC FI(SYSPRINT) DA(*)". > What if it hadn't been a terminal? Perhaps in a batch job. It might need then to be restored to a PATH or a DSN(MOD). SVC99 INFO might provide guidance. >________________________________________ >From: Frank Swarbrick [[email protected]] >Sent: Tuesday, January 26, 2021 1:21 PM > > ... if you have _BPX_SHAREAS=YES set you will get the following error: > >[-sh]DVFJS:/u/dvfjs/src:>cob2 -v -o test2 test2.cbl > >compiler: ATTCRCTL PARM=RENT,TERM /u/dvfjs/src/test2.cbl >cob2: An error occured when dynamically allocating >cob2: pathname: /u/dvfjs/src/test2.lst ddname: SYSPRINT >cob2: SVC99 returned rc: 4 errcode: 410 infocode: 0 > >This seems to be because: >1) TSO allocates (in my environment, in any case) SYSPRINT and SYSTERM >(allocated to my terminal) >2) cob2 tries to dynamically allocate these data sets for itself. > "data set"? ddname? Whatever. >This causes the SVC99 error 4 reason 410, because the DDNAME of SYSPRINT is >already allocated to your address space. > >You can get around this by specifying _BPX_SHAREAS=NO on the same line ahead >of the cob2 command: >_BPX_SHAREAS=NO cob2 -v -o test2 test2.cbl > >Or you can create your own cob2 wrapper script and have it do this for you. > Perhaps merely wrapping it, externally or internally, with '(' and ')' would isolate sufficiently with fewer expensive internal AS creations e.g.: ( exec cob2 -v -o test2 test2.cbl ) >Probably this only occurs when using the TSO OMVS shell. I imagine if you >telnet or ssh in, the shell would not have SYSPRINT etc. already allocated. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
