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
 

 

Usage of COBOL linkage length variable.

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

New User


Joined: 21 Mar 2005
Posts: 18
Location: India

PostPosted: Wed May 30, 2007 6:17 pm    Post subject: Usage of COBOL linkage length variable.
Reply with quote

Can somebody help me out on the following:

While Passing the PARM from the JCL to a Cobol program we declare the Length of the Parm in the Linkage as a variable.

What is the use of this Length variable? Why do we need to specify it?
What can be the Maximum length of the Parm field?
If we don't specify the Length field will it cause any abend? If so what type of abend will be generated?

________
Somnath
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed May 30, 2007 9:08 pm    Post subject:
Reply with quote

check this link
http://www.davar.net/MF/REFER/CODE.HTM#Continue_PARM_
Back to top
View user's profile Send private message
somnath

New User


Joined: 21 Mar 2005
Posts: 18
Location: India

PostPosted: Thu May 31, 2007 11:25 pm    Post subject:
Reply with quote

Thanks Krisprem.
I got the answer for the Maximum length of the parm. Can u please let me know the rest?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Jun 01, 2007 4:38 am    Post subject: Re: Usage of COBOL linkage length variable.
Reply with quote

somnath wrote:
While Passing the PARM from the JCL to a Cobol program we declare the Length of the Parm in the Linkage as a variable.
Well, how else would you know how long it was?
Quote:
What is the use of this Length variable? Why do we need to specify it?
Because it is being passed to you and you need to know the length of the data being passed to you.
Quote:
If we don't specify the Length field will it cause any abend? If so what type of abend will be generated?
If you don't specify the length, you will have garbage in the first couple bytes and might get a S0C4 if you reach too far.
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 Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
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 Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


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