MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Valid Program-ID in COBOL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Declan
Beginner


Joined: 04 May 2005
Posts: 15
Topics: 8

PostPosted: Tue Sep 15, 2009 11:40 am    Post subject: Valid Program-ID in COBOL Reply with quote

Hi there,

I've been given a list of EZT programs to convert using the IBM Migration Utility. One of the EZT programs starts with a $ sign. The IBM Migration Utility converts the EZT to Cobol as part of the compiler.

But the compiler doesn't like the Program-ID and I receive the following.

Code:

            IDENTIFICATION DIVISION.
            PROGRAM-ID. $SYSSTAT.

IGYDS0027-S Non-COBOL character(s) were found starting with "$" in column 20.

            AUTHOR. NOAUTHOR.
            ENVIRONMENT DIVISION.
            CONFIGURATION SECTION.


I didn't think the dollar sign would be an issue according to this from the IBM MANUALS .....
Quote:
All the characters used in the name must be alphabetic, digits, or the hyphen, except that if the program-name is entered in the literal format and is in the outermost program, then the literal can also contain the extension characters @, #, and $.


The PGMNAME compliler option is COMPAT.

The compiler obviously doesn't like the Program-ID .... but for my own future reference - can I use non-alphanumeric characters in the program name??

Thanks!
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Tue Sep 15, 2009 11:47 am    Post subject: Reply with quote

Reading the manual, my interpretation of "literal format" means that the program-id is in quotes. Try placing the program-id in quotes. If not in literal format, the name cannot use $, #, or @.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
Anuj Dhawan
Intermediate


Joined: 19 Jul 2007
Posts: 298
Topics: 7
Location: Mumbai,India

PostPosted: Wed Sep 16, 2009 11:35 pm    Post subject: Reply with quote

Terry is correct, if you change this
Code:
PROGRAM-ID. $SYSSTAT.
to
Code:
PROGRAM-ID. "$SYSSTAT".
your code will be compiled successfully.

Please note, if you put it as
Code:
PROGRAM-ID. "$SYSSTAT."
("." inside the quotes) then you'll get an error message because "$SYSSTAT." will be treated as ""$SYSSTAT". " which is, ofcourse, an error.
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group