View previous topic :: View next topic |
Author |
Message |
Amit79kr Beginner
Joined: 06 Jul 2007 Posts: 12 Topics: 4
|
Posted: Sun Feb 08, 2009 7:45 am Post subject: Values getting dropped on call using linkage |
|
|
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 |
|
|
haatvedt Beginner
Joined: 14 Nov 2003 Posts: 66 Topics: 0 Location: St Cloud, Minnesota USA
|
Posted: Sat Feb 14, 2009 2:27 pm Post subject: |
|
|
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 |
|
|
Amit79kr Beginner
Joined: 06 Jul 2007 Posts: 12 Topics: 4
|
Posted: Tue Feb 17, 2009 4:30 am Post subject: |
|
|
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 |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Tue Feb 24, 2009 11:33 am Post subject: |
|
|
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 |
|
|
Amit79kr Beginner
Joined: 06 Jul 2007 Posts: 12 Topics: 4
|
Posted: Mon Mar 02, 2009 12:37 pm Post subject: |
|
|
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 |
|
|
|
|