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 can we set SSRANGE compiler option in COBOL

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

New User


Joined: 24 Aug 2006
Posts: 2

PostPosted: Tue Aug 29, 2006 1:36 pm    Post subject: How can we set SSRANGE compiler option in COBOL
Reply with quote

can anybody please tell me how to set ssrange in compiler
Back to top
View user's profile Send private message

jose.jeyan

New User


Joined: 28 Jul 2006
Posts: 60
Location: Mumbai

PostPosted: Tue Aug 29, 2006 7:16 pm    Post subject:
Reply with quote

hey

while compiling the cobol pgm thru foreground that is going thru 4.17 in ispf panel there will be a option called compiler options and there u can specify ssrange ..

jose.jeyan

correct me if i am wrong anywhere
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1226
Location: Israel

PostPosted: Tue Aug 29, 2006 8:03 pm    Post subject:
Reply with quote

or you can add the line:
CBL SSRANGE
before the ID DIVISION in the program source.
Back to top
View user's profile Send private message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Mon Sep 11, 2006 2:42 pm    Post subject:
Reply with quote

Hi Marso, we can pass all of the Compiler options in this way? (like CBL SSRANGE, TRUNC, OFFSET, LIST, etc.,). I was thinking that we can pass the Compiler options only thru PARM parameter. Also please let me know in how many ways can we pass the Compiler options?

Thanks!
Rathna.
Back to top
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Mon Sep 11, 2006 10:44 pm    Post subject: Re: How can we set SSRANGE compiler option in COBOL
Reply with quote

Anything can be passed using PARM option in JCL, Care need to be taken wether it uses the Proc or not,
I am sure you use Proc for compiling, check the step name and give it in step,
FYI: We give PARM.COB=(SSRANGE)
Back to top
View user's profile Send private message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Tue Sep 12, 2006 2:13 pm    Post subject: Re: How can we set SSRANGE compiler option in COBOL
Reply with quote

Hi Thank you very much for your information. Also I need in how many ways we can pass the compiler options.

Thanks!
Rathna.
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Tue Sep 12, 2006 4:32 pm    Post subject:
Reply with quote

I belive, compiler options can be passed to the compiler using PARM parameter in the compile JCL.

No idea as to how it can be (if possible) passed through cobol code itself.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1226
Location: Israel

PostPosted: Wed Sep 13, 2006 4:37 pm    Post subject:
Reply with quote

There are only 2 way of passing options to the COBOL compiler.
1-In the JCL, with the PARM= option.
2-In the CBL card, just before the ID DIVISION.
Your shop may use the COBOL default values or set its own default values.

All valid options can be passed using any of the 2 methods.
They are processed in that order (PARM then CBL), and in case of conflict the last one found will be in effect.
This means, for example, if the compilation job contains PARM='NOLIST' you can override it by placing a CBL LIST in your program.

If the COBOL program have sequence numbers, the CBL can start in column 8, otherwise it can start in column 1.
PROCESS can be used instead of CBL, they are synonyms.
And last but not least, as there cannot be continuation line, you can use more than one CBL line:
CBL SSRANGE
CBL VBREF,XREF
Back to top
View user's profile Send private message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Thu Sep 14, 2006 12:02 pm    Post subject:
Reply with quote

Wow!!! Thank you very much Marso. Now I got the clarifications on all of my doubts which I have in this topic.

Thanks!
Rathna.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1226
Location: Israel

PostPosted: Thu Sep 14, 2006 9:23 pm    Post subject:
Reply with quote

Just happy to help.
I only hope I didn't miss anything!
Back to top
View user's profile Send private message
nuck

New User


Joined: 09 Dec 2005
Posts: 33

PostPosted: Fri Sep 15, 2006 2:53 pm    Post subject:
Reply with quote

...just a little thought on the use of SSRANGE....

if there is any programming which sets a subscript to be above the maximum value on purpose (eg. to exit a perform-varying) then the program will bomb.

eg:

perform varying sub from 1 by 1 until sub > allowed-max
if tab-element(sub) = 'whatever'
move tab-element(sub) to save-element
compute sub=allowed-max + 1
end-if
end-perform

...and yes, I've seen programs like that...
Back to top
View user's profile Send private message
Ishu Gupta

New User


Joined: 10 Mar 2010
Posts: 1
Location: Chennai

PostPosted: Thu Mar 18, 2010 2:54 pm    Post subject: Reply to: How can we set SSRANGE compiler option in COBOL
Reply with quote

I've tried using the SSRANGE compiler option in the cobol program before the id division as advised in this thread but it dint give any abend for me when the array exceeded the max limit. I also tried giving the SSRANGE option along with the other options:

LKED EXEC PGM=HEWL,REGION=3M,COND=(4,LT),
PARM=(LIST,LET,XREF,XCAL,MAP,'RMODE=ANY','AMODE=31',sSRANGE)

but i got an error in the link edit step of the compile job. I even tried giving PARM=SSRANGE along with the IGYCRCTL step but that too dint give any abend when the array's limit was defaulted while running... Now please clarify as to what needs to be done to stop the array limit from breaching.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Mar 18, 2010 4:00 pm    Post subject: Reply to: How can we set SSRANGE compiler option in COBOL
Reply with quote

SSRANGE is a compile parm NOT a linkedit parm. Once you have this fixed, be aware that the LE run-time option CHECK must be activated in order for SSRANGE to work.

Marso's previous CBL examples will work just fine.

It is advised that you NOT use SSRANGE together with CHECK in production, due to the overhead involved.

Speak with your Tech Support people about this.

Bill
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Thu Mar 18, 2010 4:21 pm    Post subject: Reply to: How can we set SSRANGE compiler option in COBOL
Reply with quote

Hi,

After reading Bill's reply, if you want to use it, please refer below statements(this was once given by Robert Sample).

Quote:
What does the JCL EXEC statement look like for the program? If you don't have a PARM=, add one that says PARM='CHECK(ON)'. If you do have one already, change it to PARM='CHECK(ON)/<your parms>'.

Alternatively, you can add

//CEEOPTS DD *
CHECK(ON)
/*

to your step
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
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Who can recomend or to know a PL1 com... Miguel Fernandez DB2 0 Tue Feb 14, 2017 1:42 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


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