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
 
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: 1188
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: 1188
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: 1188
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 Using indexed variables in EZPLUS SRIDEVI TANTRY CA Products 1 Thu Feb 01, 2018 12:15 pm
No new posts COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm

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