IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to specify Compiler Options from COBOL Program


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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
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
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: 1210
Location: India

PostPosted: Sat Mar 05, 2005 9:41 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts How I Found a Bug in a FORTRAN Compiler All Other Mainframe Topics 4
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top