On Thu, 21 Jun 2018 10:45:01 +1000, Andrew Rowley wrote: > >Unfortunately [ ... ] the symbols in SYSIN are not >substituted the same way as in the regular JCL. I have been playing >around with them and my conclusion is that the whole feature seems to >have been badly thought out. > Yes.
>- Symbols in in stream data are not necessarily substituted with the >same value as the same symbol in the JCL of the same step > o First, PROCs are expanded by the converter at the point of EXEC PRC=... o Then, symbols in JCL statements are resolved to the last value assigned before the point of reference. o Symbols in SYSIN are resolved to the last value assigned before the next EXEC PGM... statement. Those steeped in MVS internals ("Kool-Aid") say this makes perfect sense. To normal people it's utter nonsense. >- Symbols "leak" from step to step and from PROCs into the main JCL, so >if you modify or add a symbol in a PROC you can break subsequent steps >in any job that calls that PROC. > I believe that symbols assigned values in a PROC statement or in EXEC PRC= are local to that PROC (and its children?) Symbols assigned values in a SET statement within a PROC are global. Ugh! It may be better to eschew SET within a PROC; rather supply default values in the PROC header. >If IBM had omitted some features, e.g. system symbols on the execution >system and instead substituted the symbols at the same time as the >symbols in the rest of the JCL, they would have lost maybe 10% of the >usefulness but decreased the astonishment by 90%. > Be careful. If the SYSIN appears within a PROC and different symbol values are in effect at various EXEC PRC=... statements, multiple copies of that SYSIN might need to be supplied for the various proc steps. But the effect could be realized by passing along with each reference to that SYSIN a list of name-value pairs of symbols used in that SYSIN, with the values at the point //SYSIN DD * appears in the JCL source. >The good news is that the syntax probably allows an easy fix in a new >version: a new value such as SYMBOLS=(JCLCNVT) where symbols are >substituted at the same time with the same logic as the rest of the JCL. > >Please IBM? > They'd only need to do it right. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN