View previous topic :: View next topic
|
Author |
Message |
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
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 |
|
|
sarunkumaar
New User
Joined: 31 Aug 2006 Posts: 15 Location: Chennai, India
|
|
|
|
Hi,
It will have the values passed thru the main program. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi,
I also think it will contain manipulated valuesmeans the value which is passed by main pgm. |
|
Back to top |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
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 |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Vamsi,
I think the value passed by the program will override the value which is give in linkage section |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
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:
www.helsinki.fi/atk/unix/dec_manuals/cobv27ua/cobrm_016.htm |
|
Back to top |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
Thanks Ekta. |
|
Back to top |
|
|
|