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
 

 

Facing problem due to Linkage section....

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

New User


Joined: 11 Jan 2008
Posts: 1
Location: noida

PostPosted: Sat Jan 19, 2008 1:53 pm    Post subject: Facing problem due to Linkage section....
Reply with quote

Hi ALL,

I have these two copybooks defined in linkage section of my programs..
Copy Book...
.....................................................................................
01 F7010-ADHOC-EXTRACT.
.....................................................................................
01 F4720-VARCHAR-WORK-DG.
05 F4720-MOVE-AREA-LL PIC S9(4) COMP.
05 F4720-MOVE-AREA PIC X(30000).
.....................................................................................
Problem:
In Calling Program F870720 Copy Book (F7010-ADHOC-EXTRACT )being populated from Copy Book 110874720(F4720-MOVE-AREA).
Code is below in blue..
MOVE F4720-MOVE-AREA (1:F4720-MOVE-AREA-LL) TO
F7010-ADHOC-EXTRACT (9:F4720-MOVE-AREA-LL)


After this control returns back to Called program F870610,in this program there is no data in this DG 110877010(F7010-ADHOC-EXTRACT)but data is populating in program F870720.

These both Copy Books defined in Linkage Section of the two programs.

I am not able to find out what is the reason .
Please help me.

Thanks in Advance
Back to top
View user's profile Send private message

William Thompson

Global Moderator


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

PostPosted: Sat Jan 19, 2008 4:26 pm    Post subject:
Reply with quote

Jeez....

How are you establishing addressability to the data areas?
How in the calling program?
How in the called program?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Sat Jan 19, 2008 5:40 pm    Post subject:
Reply with quote

manish84 wrote:
Copy book for the both programs are same and I defined Copybook in the linkage section of both programs.
yes, but how are you establishing addressability to the data areas?
How in the calling program?
How in the called program?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jan 19, 2008 9:08 pm    Post subject:
Reply with quote

Hi Manish,

You only define the data areas in the CALLed pgm; you define the the "sending" data in WS of the CALLing pgm and use the CALL's USING clause to make them available to the CALLed pgm.

In the CALLed pgm use the USING clause in the PROCEDEURE DIVISION heading, pointing to the LS variable definitions.

E.g.:
Code:
 calling pgm code
WS
ws-copybook ....

PD
CALL subpgm USING cpybk fields
.
.
.

called pgm code
LS
ls-copy book....

PROCEDURE DIVISION USING ls-copybook fields
.
.
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 Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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