MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Values getting dropped on call using linkage

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Amit79kr
Beginner


Joined: 06 Jul 2007
Posts: 12
Topics: 4

PostPosted: Sun Feb 08, 2009 7:45 am    Post subject: Values getting dropped on call using linkage Reply with quote

Hello,

I have been running through this issue, I have a CICS program calling another module which was not translated as it was not having any CICS statements. The called module is COBOL-DB2 element and is called dynamically.

I am passing a value to the called program through linkage section. Before calling when I see the values are in proper format. When I try to get the values in the called program it shows spaces... low values....etc.

Just for the information, when I call the program I have initialize statements (which has occurs clause). Could this be causing an issue when trying to get the value in called program?

Addressability is fine, the structure used in the programs are same length and same format.

I am not able to understand why the value spaces out, and at present I can only think of initialize statement or occurs clause in the linkage section.

Any pointers will be of help.

Thanks.
Back to top
View user's profile Send private message
haatvedt
Beginner


Joined: 14 Nov 2003
Posts: 66
Topics: 0
Location: St Cloud, Minnesota USA

PostPosted: Sat Feb 14, 2009 2:27 pm    Post subject: Reply with quote

Amit79kr,

are you using an INDEX which was passed via the linkage area. If so that may be the cause of your problem. There is a way to do this... if this is what you would like to do, contact me via email and I can help you out.

perhaps you could post the call statement from the calling program and the procedure division statement and linkage section from the called program.

Thanks,
_________________
Chuck Haatvedt

email --> clastnameatcharterdotnet

(replace lastname, at, dot with appropriate
characters)
Back to top
View user's profile Send private message
Amit79kr
Beginner


Joined: 06 Jul 2007
Posts: 12
Topics: 4

PostPosted: Tue Feb 17, 2009 4:30 am    Post subject: Reply with quote

Hi Haatvedt,

Thanks for the reply.

I do have INDEX in the structure that is passed via the CALL. Bellow is the call statement -
Code:

CALL PRG-DB2-DELETE                       
            USING DB2-STRUCTURE
            DB2-CALL-AREA               


DB2-STRUCTURE which is at 01 level has many occurs into it, one of the example is -
Code:

05  DB2-ERR-WRN-INFO OCCURS  20 TIMES         
                     INDEXED BY ERR-NDX.


In the called program the procedure division and Linkage section looks like this -

Code:

LINKAGE SECTION.                                   
                                                   
01  DB2-STRUCTURE.                           
COPY DB2STRUC.                                     
                                                   
COPY DB2CALLA.                                     
                                                   
PROCEDURE DIVISION USING DB2-STRUCTURE       
                         DB2-CALL-AREA.


I verified that the structure being passed and structure received in the called program are same.
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Tue Feb 24, 2009 11:33 am    Post subject: Reply with quote

Amit79kr,

Which fields get blanked out, are they from DB2-STRUCTURE or DB2-CALL-AREA?

Also, you can always verify your doubt with initialize by checking values before and after initialization. From your post it is not clear when you are executing the initialize statement.

Diba.
Back to top
View user's profile Send private message Send e-mail
Amit79kr
Beginner


Joined: 06 Jul 2007
Posts: 12
Topics: 4

PostPosted: Mon Mar 02, 2009 12:37 pm    Post subject: Reply with quote

Thanks Dibakar,

The initialize is before call and the values get initialized properly. Anyways the problem seem to have vanished, no idea how or why. Probably if it comes again I shall re-open this thread.

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group