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
 

 

Cobol Error while calling one COBOL-CICS program

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

New User


Joined: 15 Sep 2007
Posts: 31
Location: Chennai

PostPosted: Sun Oct 23, 2011 9:30 pm    Post subject: Cobol Error while calling one COBOL-CICS program
Reply with quote

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
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Sun Oct 23, 2011 10:12 pm    Post subject: Reply to: Cobol Strange Error !
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Sun Oct 23, 2011 10:58 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Sun Oct 23, 2011 11:51 pm    Post subject: Reply to: Cobol Strange Error !
Reply with quote

Bill,

Glad you were able to decipher this....

Mr. Bill
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Oct 24, 2011 1:10 am    Post subject: Reply to: Cobol Strange Error !
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Oct 24, 2011 1:30 am    Post subject:
Reply with quote

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
View user's profile Send private message
prem_ibm

New User


Joined: 15 Sep 2007
Posts: 31
Location: Chennai

PostPosted: Mon Oct 24, 2011 5:01 pm    Post subject: Reply to: Cobol Strange Error !
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Oct 24, 2011 5:22 pm    Post subject:
Reply with quote

whew! sure glad that was cleared-up.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Oct 24, 2011 5:25 pm    Post subject: Re: Reply to: Cobol Strange Error !
Reply with quote

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
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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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