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
 

 

Doudt Regarding Linkage Variables.

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

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Wed Sep 20, 2006 10:45 am    Post subject: Doudt Regarding Linkage Variables.
Reply with quote

Hi,

I have a doudt regarding the Variable passing from a main standalone progam to a sub routine.

There was a copy book in the Working storage of the main program. All the variables in the copybook have a "VALUE" clause.

There was a process to manipulates these variables in the main program before a call to the sub program

In the linkage section of the sub routine, the same copybook is present with the same 'VALUE' clause.

My doudt is ..what values does the copybook variables will have. Is that what the 'VALUED' clause declared in the linkage copybbok or the values pased thru the main program.

~Vamsi
Back to top
View user's profile Send private message

sarunkumaar

New User


Joined: 31 Aug 2006
Posts: 15
Location: Chennai, India

PostPosted: Wed Sep 20, 2006 11:12 am    Post subject:
Reply with quote

Hi,

It will have the values passed thru the main program.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Sep 20, 2006 11:24 am    Post subject:
Reply with quote

Hi,

I also think it will contain manipulated valuesmeans the value which is passed by main pgm.
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Wed Sep 20, 2006 11:34 am    Post subject:
Reply with quote

hi guptae/sarun,

Giving Value clause for a variable means Initialization.
I couldn't map ......the reason y the values from main program where passed to sub routine
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Sep 20, 2006 11:44 am    Post subject:
Reply with quote

Hi Vamsi,

I think the value passed by the program will override the value which is give in linkage section
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Sep 20, 2006 11:55 am    Post subject:
Reply with quote

Hi Vasmi,

Value clause format :-



Format 1

--------

VALUE {IS} literal



Format 2

--------

88 condition-name VALUE/VALUES {IS/ARE}

literal1 {THROUGH/THRU} literal2



You should not give a value clause of format 1 type for a variable in Linkage section. Only Format 2 VALUE clauses may be coded in the FILE and LINKAGE SECTIONS. As an IBM extension, Format 1 VALUE clauses coded in the FILE and LINKAGE SECTIONS are treated as comments.

This link will be useful:
http://www.helsinki.fi/atk/unix/dec_manuals/cobv27ua/cobrm_016.htm
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Wed Sep 20, 2006 12:12 pm    Post subject:
Reply with quote

Thanks Ekta.
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 Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm
No new posts TWS 'global' or 'local' variables Steve Coalbran IBM Tools 2 Thu Mar 17, 2016 7:40 pm
No new posts Number of parameters in Linkage kregen COBOL Programming 4 Wed Jan 27, 2016 5:13 pm
No new posts Using different values for Skeleton d... venksiv CLIST & REXX 8 Thu Sep 03, 2015 5:28 pm


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