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

How can we set SSRANGE compiler option in COBOL


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

PostPosted: Tue Aug 29, 2006 8:03 pm
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
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
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
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
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: 1353
Location: Israel

PostPosted: Wed Sep 13, 2006 4:37 pm
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
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: 1353
Location: Israel

PostPosted: Thu Sep 14, 2006 9:23 pm
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
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Mar 18, 2010 4:00 pm
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: 792
Location: Chennai, India

PostPosted: Thu Mar 18, 2010 4:21 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL sorting, with input GDG base COBOL Programming 7
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 0
No new posts Replacing FILLER with FILLER<SeqNu... DFSORT/ICETOOL 2
No new posts Compile Sp Cobol base COBOL Programming 1
No new posts SQLCODE=-311 in Cobol SP-DB2. COBOL Programming 2
Search our Forums:

Back to Top