Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to specify Compiler Options from COBOL Program

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

New User


Joined: 05 Jun 2004
Posts: 43

PostPosted: Sun Aug 08, 2004 8:39 pm    Post subject: How to specify Compiler Options from COBOL Program
Reply with quote

Hi Friends,

I have one dought.

HOW I CAN OVERWRITE THE PARAMETERS OF COMPILER USING COBOL PROGRAM. IS IT POSSIBLE? IF POSSIBLE GIVE ME SOLUTION.


bye
SHRIYA
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Aug 08, 2004 11:35 pm    Post subject:
Reply with quote

Hi SHRIYA,

It would help if you provide the JCL in the proc you are executing. There are a few ways of presenting option entries in JCK. It depends on what your shop uses.

Regards, Jack.
Back to top
View user's profile Send private message
weejaireddy

New User


Joined: 22 Feb 2005
Posts: 2
Location: pune.india

PostPosted: Mon Feb 28, 2005 3:49 pm    Post subject:
Reply with quote

Hi shriya,

as for my knowledge we can overwrite the parameters of compiler using cobol programs.

On top of the program write CBL (COMPILER OPTIONS).This will change the default parameters of compiler

Regards, vijay Reddy.
Back to top
View user's profile Send private message
lnvrn

New User


Joined: 24 Feb 2005
Posts: 8
Location: Mumbai

PostPosted: Tue Mar 01, 2005 11:18 am    Post subject:
Reply with quote

Hi Folks,

Why can't we overwrite this compiler options by using JCL.
All options are welcome.

Thanks & Regards
Back to top
View user's profile Send private message
Rajshekhar V Patil

New User


Joined: 23 Feb 2005
Posts: 7
Location: Mumbai

PostPosted: Tue Mar 01, 2005 1:04 pm    Post subject:
Reply with quote

COBOL codeing

IN linkage section we are going to define the parms.
According to that in JCL u going to override the parms .
For example:

12900**************************************************01290000
013000 LINKAGE SECTION. 013100***********************************************01310000
013200 01 LINK-PARAMETERS.
013300 49 LINK-PARM-LENGTH PIC S9(04) COMP.
013400 49 LINK-PARM-TEXT PIC X(1).


015070 EVALUATE LINK-PARM-TEXT
015080
015090 WHEN ?1?
015091 OPEN INPUT RATKLI
015092 IF NOT RATKLI-OKAY
015093 DISPLAY '**************************************'
015094 DISPLAY '* ERROR ON RATKLI(OPEN) *'
015095 DISPLAY '* FILE STATUS: ' WS-RATKLI-STATUS
015096 DISPLAY '**************************************'
015097 GOBACK
015098 END-IF
015099 WHEN ?2?
015100 OPEN INPUT RATELI
015111 IF NOT RATELI-OKAY
015120 DISPLAY '**************************************
015130 DISPLAY '* ERROR ON RATELI(OPEN) *'
015140 DISPLAY '* FILE STATUS: ' WS-RATELI-STATUS
015150 DISPLAY '**************************************'
015160 GOBACK
015170 END-IF
015171 END-EVALUATE.


Like this you read & close the files.
????????..
In JCL
//STEP010 exec pgm=name ,parm=?1?
.
.
//step020 exec pgm=name, parm=?2?


Like this.
That all
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Mar 05, 2005 9:06 pm    Post subject:
Reply with quote

Raj, I think you misunderstood BVR's question. He's referring to the COMPILER options.

BVR, take a look at your compile JCL. In the compile step, as part of the EXEC stmt there should be a PARM. This parm should contain the compiler options. Just override this PARM by including those already stated and adding your own. Remember that some compiler options may be mutually exclusive.

Also, some compiler procs use symbolics to send options to the compiler. You may have to use a different approach in that case.
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1200
Location: India

PostPosted: Sat Mar 05, 2005 9:41 pm    Post subject:
Reply with quote

But the question is:

Quote:
HOW I CAN OVERWRITE THE PARAMETERS OF COMPILER USING COBOL PROGRAM?



With the CBL (PROCESS) statement, you can specify compiler options to be used in the compilation of the program. The CBL (PROCESS) statement is placed before the Identification Division header of an outermost program.

A series of one or more compiler options, each one separated by a comma or a space.

The CBL (PROCESS) statement can be preceded by a sequence number in columns 1 through 6. The first character of the sequence number must be numeric, and CBL or PROCESS can begin in column 8 or after; if a sequence number is not specified, CBL or PROCESS can begin in column 1 or after.

The CBL (PROCESS) statement must end before or at column 72, and options cannot be continued across multiple CBL (PROCESS) statements. However, you can use more than one CBL (PROCESS) statement. If you use multiple CBL (PROCESS) statements, they must follow one another with no intervening statements of any other type.

The CBL (PROCESS) statement must be placed before any comment lines or other compiler-directing statements.
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. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Default FTP options vasanthz All Other Mainframe Topics 2 Fri Aug 25, 2017 5:58 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us