View previous topic :: View next topic
|
Author |
Message |
prem_ibm
New User
Joined: 15 Sep 2007 Posts: 31 Location: Chennai
|
|
|
|
Hi
I got little strange Error while using Cobol cics program,Inside the Main COB-CICS-DB2 programe we are calling so many programe and while calling one COBOL-CICS programe from the main programe..we got cics response NORMAL..inside that programe we had some logic based on some validation its setting 000 value for 88 level variable and the same 88 variable we are using after call return successfull to main programme and once we are getting Response Normal.
After that we are checking that 88 level variable like below
IF ws-return-status
Perfrom xyz para
Main point :- but we were getting space in that field rather then getting 000 or other then 000 like 002,003 which indiacte casue of our validaion inside of that called programe.
We tried in all ways finally when we change the copy book level issue got resolved.
like earlier all programe copy books present under one 01 level like below
01 GRP
COPY XYZ
COPY ABC
.
.
.
COPY WPW
Finally we change our copy book COPY ABC in another 01 level like below
01 GRP
COPY XYZ
.
.
.
COPY WPW
01 GRP
COPY ABC
then we got status 000 for that 88 level variable..
this is the temporary fixed we have done...still we have to fix permanent
expert please advise on this what wil be the cause for this type of scenario |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
From what I can tell, it might be a WS initialization issue in the CALLED sub-program.
If the WS fields have a VALUE clause and you'd like the VALUE to take effect every time the sub-program is CALLED, then specify -
PROGRAM-ID. "program-name" IS INITIAL.
Mr. Bill |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Can you show us the LINKAGE SECTION of the called program, its PROCEDURE DIVISION USING and the definitions (expanded, not the copybook name) of all the data passed to the called program and the CALL statement.
I assume you changed the CALL, LINKAGE SECTION and the PROCEDURE DIVISION USING for your temporary fix, so please show those as well. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Bill,
Glad you were able to decipher this....
Mr. Bill |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I was thinking if field A is set in prog B, prog B returns to prog A and field A does not have the value in, then A in prog A is not in the same place as A in prog B.
It looks like there are a load of copybooks under one 01-level. Something is messed-up with this arrangement prior to the copybook with A in. Seperating A form the 01-level and giving it a new 01 (and presumablly doing all the right stuff to be able to use it in prog B) works.
I'd bet that the displacement of A from the 01 it is subordinate to in the Linkage is different form the displacement of A from the 01 it is subordinate to in the Working-Storage of the caller.
That's the easiest thing I can think of that fits what we know. Either order of copybooks different (something below the A copybook in one program, above it in the other) or an extra non-copybook field or just copybooks out of step with a change of length. We'll see, I suppose, if TS gets back to us. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
why waste time trying to figure out what these rookies did,
until they tell us exactly what was the situation before and after.
if they even know. |
|
Back to top |
|
|
prem_ibm
New User
Joined: 15 Sep 2007 Posts: 31 Location: Chennai
|
|
|
|
Thanks a lot to all the Senior Members who has replied to my query by spending their precious time.
1) i have checked in Production for 01 Level...but all the programe have
same type of declaration as i coded in my pgm.
later i added my copybook which causing error under new 01
Level.Except this change i have not changed in Linkage
Secton,Procedure devision etc.
2) i have initialized the copybook variable in main programe.
3) We are moving & seting address as below before call the Sub
programe (called module).
MOVE WL-XYZ TO NJP5500W-STG-ID
SET NJP5500W-COMM-ADDR TO ADDRESS OF COMM-WORK-REC
PERFORM L500-NJPGPRM
IF YHXGPRM-RTUN-NOT-AVAIL
PERFORM PARA XYZ
4) Linkage section of called module (programe).
LINKAGE SECTION.
01 DFHCOMMAREA.
COPY NJP5500W.
Thanks |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
whew! sure glad that was cleared-up. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
prem_ibm wrote: |
[...]
MOVE WL-XYZ TO NJP5500W-STG-ID
SET NJP5500W-COMM-ADDR TO ADDRESS OF COMM-WORK-REC
[...] |
If NJP5500W-COMM-ADDR is your 01-level, what was it addressing at the time you did the MOVE of WL-XYZ? Unless it was already pointing to COMM-WORK-REC, then you have left NJP5500W-STG-ID behind in the original location.
Code: |
01 A at address abcd.
05 B PIC X.
put something in B.
change address of A.
01 A at new address, efgh.
05 B PIC X.
B now contains some unknown value. |
|
|
Back to top |
|
|
|