Yep, that explains it and is reasonable since that is how IBM has pretty much 
used symbols before.  I should have remembered that.

Al Nims
Systems Admin/Programmer III
UF Information Technology
East Campus 
P.O. Box 112050
Gainesville, FL. 32611
(e) ajn...@ufl.edu 
(p) (352) 273-1298

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Steve Horein
Sent: Monday, March 26, 2018 6:30 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: In-Stream Symbols and The Length

Per
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ibm.com_support_knowledgecenter_SSLTBW-5F2.2.0_com.ibm.zos.v2r2.ieab600_jclsymstr.htm&d=DwIFaQ&c=pZJPUDQ3SB9JplYbifm4nt2lEVG5pWx2KikqINpWlZM&r=0Ef64GJS77DVfhr5GGKZeQ&m=Cxwj7cWPoLzni0WVenvVTrN2d24kO5jlBJNhxVm5T70&s=A7U3UInhxX4ROkJqLVQZklfSKfbOhQA_dw-jiMIDWZQ&e=
:

"The syntax rules for using symbols in in-stream data include those described 
previously for using symbols in JCL. One important difference is the handling 
of blanks in the input data. When symbols are substituted in JCL statements, 
there is no special treatment of blanks—as symbols are substituted, the 
resulting string expands or contracts depending on whether the symbol value is 
longer or shorter than the symbol expression (symbol name with a leading 
ampersand character and optional period at the end of the symbol name). When 
symbols are substituted in in-stream data, the system attempts to maintain the 
position of non-blank characters. This is achieved by adding or removing blanks 
between non-blank character sequences. At least one blank is always preserved 
to maintain syntactical validity of the data. The resulting string never 
contracts and only expands if there are not enough blanks to remove to maintain 
data positioning.
Refer to Defining and nullifying JCL symbols 
<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ibm.com_support_knowledgecenter_SSLTBW-5F2.2.0_com.ibm.zos.v2r2.ieab600_jdefine.htm-3Fview-3Dkc&d=DwIFaQ&c=pZJPUDQ3SB9JplYbifm4nt2lEVG5pWx2KikqINpWlZM&r=0Ef64GJS77DVfhr5GGKZeQ&m=Cxwj7cWPoLzni0WVenvVTrN2d24kO5jlBJNhxVm5T70&s=Lcx9XN4_X0-NH8Wy-bH7TxHjfFbg9u4p-DBU_lDMW2c&e=>
for
additional information."

So I'm reading that as "for best results, define your symbol name no longer 
than the expected symbol value."

On Mon, Mar 26, 2018 at 10:52 AM, Nims,Alva John (Al) <ajn...@ufl.edu>
wrote:

> Recently we upgraded from z/OS 1.13 to z/OS 2.02 so that is why I am 
> asking this question so late in the game.
>
>
>
> I have been working with using In-Stream Symbol substitution, I have 
> been waiting over 30 years for this!!!, but I digress, and I noticed a 
> minor annoyance/problem when some of my symbols get substituted and 
> maybe I can get some light shed on it.
>
>
>
> I have a set of 4 symbols that I EXPORT:
>
> //* YYYY   -> 4 digit Year.
>
> //YYYY         SET        YYYY=2018
>
> //* MM     -> 2 digit Month
>
> //MM           SET          MM='03'
>
> //* M3Name -> 3 Charachter Month, 'JAN', 'FEB', 'MAR', ....
>
> //M3NAME       SET      M3NAME='MAR'
>
> //* MNAME  -> Full Month Name.
>
> //MNAME        SET       MNAME='March'
>
> One use is in an invocation of IKJEFT01 & SYSTSIN DD:
> //SYSTSIN      DD       *,SYMBOLS=JCLONLY
> BPXBATCH  SH rm '/u/ajnims/FTP Client &YYYY.-&MM..xls'
> Which substitutes the way I expect and want no blank spaces after 2018 
> &
> 03:
> BPXBATCH  SH rm '/u/ajnims/FTP Client 2018-03.xls'
>
> Now comes the fun part, in an invocation of SAS, it being SAS has 
> nothing to do with it, just that it is the tool I am using for this 
> particular activity and will explain the syntax.
> Within the SAS program I use the &MM., &M3NAME. and &MNAME. Symbols.
> First use of a symbol:
> WHERE=(MnthN = &MM.)
> Which translates into:
> WHERE=(MnthN = 03)
> No spaces again.
>
> Here is where I have a problem:
> Sheet_Name='Client &M3NAME. &YYYY.'
> I get:
> Sheet_Name='Client MAR      2018'
> See all those spaces between "MAR" and "2018"?  It looks like the 
> length is defined by the symbol name plus the "&." Characters, but why 
> did I not get that with the &YYYY. And &MM.?
>
> I also have:
> Title "FTP Client Connections for the Month of &MNAME. &YYYY."; Which 
> gives me:
> Title "FTP Client Connections for the Month of March   2018";
>
> Maybe the fix is to make &M3NAME. be just &MMC. Or something like 
> that, 3 characters for the symbol name, but going to have a problem 
> with the full month name.
>
> Al Nims
> Systems Admin/Programmer III
> UF Information Technology
> East Campus
> P.O. Box 112050
> Gainesville, FL. 32611
> (e) ajn...@ufl.edu<mailto:ajn...@ufl.edu>
> (p) (352) 273-1298
>
>
> ----------------------------------------------------------------------
> 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

----------------------------------------------------------------------
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