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

Can we initialise value in linkage section


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
joice

New User


Joined: 07 Apr 2004
Posts: 4

PostPosted: Wed Apr 07, 2004 5:59 pm
Reply with quote

1. can we initialise value in linkage section.

ex. 01 a pic 9(5) value 90.
Back to top
View user's profile Send private message
mvs_butta

New User


Joined: 23 Dec 2003
Posts: 13

PostPosted: Wed Apr 07, 2004 6:26 pm
Reply with quote

No you cannot use.

Quote:
In the File and Linkage Sections, the VALUE clause must be used only in
condition-name entries.
Back to top
View user's profile Send private message
joice

New User


Joined: 07 Apr 2004
Posts: 4

PostPosted: Mon Apr 19, 2004 12:09 pm
Reply with quote

i use one file that is empfile,
question is in mainprogram i open the file then call the subprograme in the subprogram i read the file empfile then i do some operation in the empfile then i come to the main program then close the file .
in this situation this operation is possible to work or not ,working means how? if it is not working means how ?
Back to top
View user's profile Send private message
leo

New User


Joined: 27 Apr 2004
Posts: 2
Location: brazil

PostPosted: Tue Apr 27, 2004 6:29 am
Reply with quote

hi!

create a image of linkage in work=storage and give it values.

ex:
working-storage section.
1 w-a.
2 w-b pic x(26) value "I don't read the handbook".
linkage section.
1 l-a.
2 l-b pic x(26).
procedure division.
move w-a to w-b.

that's it!
Back to top
View user's profile Send private message
bryan-yang

New User


Joined: 16 Apr 2006
Posts: 16
Location: BeiJing, China

PostPosted: Thu Apr 20, 2006 8:30 pm
Reply with quote

There are 3 things to do.
icon_redface.gif
The first is declared a physical file in the File-Control paragraph for each program.

The second is declared a logical file with the EXTERNAL clause in the File section for each program.

The third is declared a data item with the EXTERNAL clause in each program's Working-Storge Section.
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 COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts FD Section to Create FB or Vb File Dy... COBOL Programming 1
No new posts OPTLINK linkage convention PL/I & Assembler 3
No new posts Sections: need one appearance of cer... DFSORT/ICETOOL 4
Search our Forums:

Back to Top