Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to make cobol avoid run time options given through parm

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sebastainj

New User


Joined: 26 May 2009
Posts: 1
Location: INDIA, Bangalore

PostPosted: Tue Sep 01, 2009 5:07 pm    Post subject: How to make cobol avoid run time options given through parm
Reply with quote

Hi all,

I am trying to convert a PL1 program to Cobol. The program, reads the parm through linkage section and process it and prints to the output. But, the input parms for the existing PL1 program, mostly starts with '/' The PL1 program is processing the parm fine. But in cobol, as you know, PARM's starting with '/' is considered as runtime options. So when I am running the cobol program, I am either getting warning messages saying invalid run time option or the linkage section is not getting the PARM at all. Is there any way to avoid these warning messages and to make Cobol consider this PARMs as just parms and not run time options ???

Sample PARM:
Code:
//STEP1 EXEC PGM=MYPGM1,PARM='/M|WELCOM'

Error Message:
Code:
CEE3608I The following messages pertain to the invocation command run-time optios.
CEE3611I The run-time option M|WELCOM was an invalid run-time option or is not supported in this release of Language

In the above example, the PARM '/M|WELCOM' doesn't contain any valid run time options. So, eventhough the cobol program is giving error messages, it is considering '/M|WELCOM' as a simple parm itself and I am getting the desired output.
Sample 2:
Code:
//STEP1 EXEC PGM=SAE102,PARM='/M|BLOCK R |'

Error Message:
Code:
CEE3608I The following messages pertain to the invocation command run-time options.
CEE3611I The run-time option M|BLOCK was an invalid run-time option or is not supported in this release of Language Environment.                                                           
CEE3610I The run-time option R was mapped to the run-time option RPTSTG.       
CEE3611I The run-time option | was an invalid run-time option or is not supported in this release of Language Environment.                                                           
Storage Report for Enclave SAE102 04/07/09 6:42:06 AM                           
Language Environment V01 R10.00                                                 
                                                                               
    STACK statistics:                                                           

The second parm had ' R ' in it's parm, which was a valid run time option. So Cobol considered the entire parm as runtime option, and so I didn't get any output-(As the linkage section variable didn't accept the PARM from JCL.

Please help me on this.

Is there any compiler option which will prevent a cobol program from reading RUN time options.??
Is there any other way to achive the results I want.??
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Tue Sep 01, 2009 5:56 pm    Post subject:
Reply with quote

Quote:
Is there any compiler option which will prevent a cobol program from reading RUN time options.??
Is there any other way to achive the results I want.??
There is no compiler option or other feature to prevent COBOL from accessing the run time options -- this is a facility of Language Environment and you have absolutely no control over it.

When you have
Code:
EXEC PGM=<COBOL program>,PARM='.../...'
everything before the slash will be the LE run time parameter(s), everything after the slash will be your COBOL parameters. As long as your LINKAGE SECTION and PROCEDURE DIVISION USING statements are correct, you should have no trouble reading the parameters passed from JCL.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 3 Thu Jan 19, 2017 1:31 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us