Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
What will parm-data1 contain in linkage section

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

New User


Joined: 23 Mar 2007
Posts: 8
Location: india

PostPosted: Mon Apr 23, 2007 4:51 pm    Post subject: What will parm-data1 contain in linkage section
Reply with quote

01 parm-data1 pic s(4) comp.
01 parm-data2 pic x(4) .

what will parm-data1 contain...?
Back to top
View user's profile Send private message

William Thompson

Global Moderator


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

PostPosted: Mon Apr 23, 2007 4:54 pm    Post subject: Re: linkage section
Reply with quote

k_sanu4u wrote:
01 parm-data1 pic s(4) comp.
01 parm-data2 pic x(4) .
what will parm-data1 contain...?
Some of us may be experts, but I doubt any are psychic .......
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Apr 23, 2007 5:04 pm    Post subject:
Reply with quote

sanu,

Quote:
01 parm-data1 pic s(4) comp.
01 parm-data2 pic x(4) .

what will parm-data1 contain...?


In cobol, there is no need to pass the lenght of the (passing) variable. So parm-data1 value should come from the called program. I stand with William to predict the value. Only thing I can say, it should fall between -32768 through +32767.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 23, 2007 5:17 pm    Post subject:
Reply with quote

Quote:
Some of us may be experts, but I doubt any are psychic .......

I Knew you were going to say that icon_lol.gif
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Mon Apr 23, 2007 5:17 pm    Post subject: Re: linkage section
Reply with quote

k_sanu4u wrote:
01 parm-data1 pic s(4) comp.
01 parm-data2 pic x(4) .
what will parm-data1 contain...?

Now, if you really meant:
LINKAGE SECTION.
01 jcl-parm.
05 parm-data1 PIC S9(4) COMP.
05 aprm-data2 PIC X(4).
Then parm-data1 would contain the length of the parm value on the EXEC card, which should be at least 4 but might be longer or shorter.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Apr 23, 2007 5:22 pm    Post subject:
Reply with quote

William,

Quote:
Then parm-data1 would contain the length of the parm value on the EXEC card, which should be at least 4 but might be longer or shorter.


This is fine for CICS COBOL program. For a general cobol program, is not the calling program should pass the value betewen -32768 to +32767?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Mon Apr 23, 2007 5:26 pm    Post subject:
Reply with quote

murmohk1 wrote:
This is fine for CICS COBOL program. For a general cobol program, is not the calling program should pass the value betewen -32768 to +32767?
Huh? Between the clues of "Post subject: linkage section", "Forum Index -> Mainframe COBOL" and "parm-data1 and parm-data2"........ icon_rolleyes.gif
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 965
Location: Richmond, Virginia

PostPosted: Mon Apr 23, 2007 5:31 pm    Post subject:
Reply with quote

William - excellent clarification, but why should the EXEC PARM be at least 4 in length?
Back to top
View user's profile Send private message
k_sanu4u

New User


Joined: 23 Mar 2007
Posts: 8
Location: india

PostPosted: Mon Apr 23, 2007 5:34 pm    Post subject:
Reply with quote

in param-data1 only S is defined inpic but actullay in comp the pic class can contain s and 9 ..so there is possiblity of error in that...?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Mon Apr 23, 2007 5:45 pm    Post subject:
Reply with quote

Phrzby Phil wrote:
but why should the EXEC PARM be at least 4 in length?
Only "should", since it looks like he is intending to access up to four bytes and good practice is that you only access memory that is yours to access.....
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Mon Apr 23, 2007 5:46 pm    Post subject:
Reply with quote

k_sanu4u wrote:
in param-data1 only S is defined inpic but actullay in comp the pic class can contain s and 9 ..so there is possiblity of error in that...?
I don't know, does it compile?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Tue Apr 24, 2007 2:10 pm    Post subject:
Reply with quote

k_sanu4u wrote:
in param-data1 only S is defined inpic but actullay in comp the pic class can contain s and 9 ..so there is possiblity of error in that...?

I dont think s(4) comp will compile. icon_confused.gif
shouldn't it be s9(4) comp..?
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 Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm
No new posts Copy a particular column based on PAR... brindhamohan DFSORT/ICETOOL 5 Wed May 11, 2016 8:49 am
No new posts Use of Parm in SORT Ambili S DFSORT/ICETOOL 2 Mon May 09, 2016 9:16 pm
No new posts Number of parameters in Linkage kregen COBOL Programming 4 Wed Jan 27, 2016 5:13 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us