Not an error on 4.2, could these be considered IDENTIFICATION DIVISION comment 
entries?

>>-+-IDENTIFICATION-+--DIVISION.--PROGRAM-ID.------------------->
   |    (1)         |
   '-ID-------------'
 
>--+-program-name-+--------------------------------------------->
   |         (1)  |
   '-literal------'
 

>--+---------------------------------------+-------------------->
   '-DATE-COMPILED.--+-------------------+-'
                     | .---------------. |
                     | V               | |
                     '---comment-entry-+-'
 
The comment-entry in any of the optional paragraphs may be any combination of 
characters from the character set of the computer. Do not confuse the 
comment-entry with a comment line. (The latter is indicated by a slash or 
asterisk in the indicator area.) The comment-entry is written in Area B on one 
or more lines. The SEU Syntax Checker, however, requires that the first 
sentence begin on the same line as the paragraph header.

Comment-entries serve only as documentation; they do not affect the meaning of 
the program. A hyphen in the indicator area (column 7) is not permitted in 
comment-entries.

-----Original Message-----
From: Charles Mills [mailto:charl...@mcn.org] 
Sent: Friday, August 03, 2012 11:41 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Is this valid COBOL syntax?

Is anyone a COBOL syntax expert? Is the following valid? (It's not a trick
question: there are no obscure PARM= options and nothing remarkable precedes 
the fragment below.) It's not an academic question. The code is accepted 
without error by the IBM Enterprise COBOL compiler V4.1, but not by a 
proprietary pre-processor, and I'm trying to figure out if the code should 
change or if the preprocessor is in error. Changing the code is not trivial:
multiple programs like this, corporate change control processes, etc., etc.

 

I think it's invalid, that the '.' strings are syntactically-invalid character 
literals. Am I missing something?

 

Starting hint: The REMARKS paragraph heading is only a * comment and not 
syntactically significant (I think).

 

Best viewed in a fixed-width font like Courier. FYI if you can't view it that 
way, the leading quote in lines 20-23 is in CC 12 and the trailing quote in CC 
72.

 

Card columns:

         1         2         3    6         7

1234567890123456789012345678901...0123456789012

 

00020 *REMARKS.

00021      '*******************   ************'

00022      '* VARIOUS COMMENT-LIKE TEXT      *'

00023      '* VARIOUS COMMENT-LIKE TEXT      *'

 

Thanks for your help.

 

Charles 


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