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

Usage of COBOL linkage length variable.


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

PostPosted: Fri Jun 01, 2007 4:38 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
Search our Forums:

Back to Top