On Mon, 8 Apr 2013 14:20:16 +0000, Pew, Curtis G wrote:

>On Apr 8, 2013, at 8:26 AM, Paul Gilmartin <[email protected]> wrote:
>
>> both:         3 //12345678.X  IF TRUE THEN 
>> and:         3 //.X  IF TRUE THEN 
>> 
>> ... which would appear to be legal according to the description fail with:
>> 
>> STMT NO. MESSAGE                                                             
>>   
>>        3 IEFC662I INVALID LABEL 
>
>The general rule for JCL labels is that the first character must be a letter 
>or national character, and while "up to" is a bit ambiguous I would have 
>expected it to enforce "at least one". These results doesn't surprise me at 
>all.
>
As John G. probably expected, I was hardly surprised; I just tested
to what I read, not to any "general rule".

>> Again, saying what it's not for, but not what it is for.
>
>I find this makes for a useful way to visually match IF � ELSE � ENDIF 
>statements:
>
>//TEST1.IF IF RC GT 0 THEN
>�
>//TEST2.IF IF ABEND THEN
>�
>//TEST2.ENDIF ENDIF
>�
>//TEST1.ELSE ELSE
>�
>//TEST1.ENDIF ENDIF

But you could as well and more economically code:

//TEST1 IF RC GT 0 THEN
�
//TEST2 IF ABEND THEN

//TEST2 ENDIF
�
//TEST1 ELSE
�
//TEST1 ENDIF

Repeating the immediately following command name hardly adds
information.

I am very disappointed that the JCL parser does not enforce matching
of labels in bracketing statements.  The RM suggests that they be
unique but doesn't enforce this.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to