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 

4038 - error while callling the sub-program?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
MFdigger
Beginner


Joined: 09 Sep 2005
Posts: 124
Topics: 52
Location: Chicago

PostPosted: Mon Apr 27, 2009 4:57 pm    Post subject: 4038 - error while callling the sub-program? Reply with quote

Hi All,

I have a main CICS program B30TXY calling the sub-program ZY12TXY as shown below. I've compiled the main program B30TXY succssfully.

Code:

MOVE 'ZY12TXY' TO EZE-PROG               
CALL EZE-PROG USING EZEPNTR EZEPTRAD     
SET ADDRESS OF ZZWA8T1 TO EZEPNTR.       
CONTINUE.                                 


Also, I could able to compile the sub-program ZY12TXY successfully using the COBOL compiler, below is the code for the subprogram ZY12TXY.

Code:

  IDENTIFICATION DIVISION.                                     
   PROGRAM-ID. ZY12TXY.                                       
  ENVIRONMENT DIVISION.                                         
  DATA DIVISION.                                               
  WORKING-STORAGE SECTION.                                     
      COPY ZZWA8T1V.                                           
  LINKAGE SECTION.                                             
   77 EZEPTRAD      PIC X(8).                                   
   77 EZEPTR        USAGE IS POINTER.                           
  PROCEDURE DIVISION USING EZEPTR EZEPTRAD.                     
      SET EZEPTR TO ADDRESS OF EZEVAL-ZZWA8T1.                 
      GOBACK.                                                   


while XPEDting the main CICS program, when the control reaches the point "CALL EZE-PROG USING EZEPNTR EZEPTRAD " calling the subprogram its abending with 4038.

Code:

 ----------------- XPEDITER/CICS - ASSEMBLER BREAK/ABEND (2.20) ------------CISS
 COMMAND ===>                                                   SCROLL ===> CSR
 MODULE: B30TXY   CSECT: B30TXY              COMPILED: 27 APR 2009 - 14.32.12     
 CAUSE: LE/370 UNHANDLED COND(HELP 4038)                        ABEND CODE: 4038
 APPLID: CICSS      USERID: XXXXABC   TERM: T277   NETNAME: TERMT277  TRAN: BCTY
 INTERRUPT OFFSET: ......    ADDRESS: 977AE946   PSW: 078D0000 00000000 00000000
 RESUME    OFFSET: ......    ADDRESS: 977AE946   LAST CICS COMMAND:             
                                                                               
 INSTRUCTION: 05EF             BALR   14,15                                     
 REGISTERS:                                                                     
                                                                               
 0-3  00000000_16E18060  00000000_16E109E8  00000000_16E18060  00000000_16E12CC8
                                                                               
 4-7  00000000_16AC6810  00000000_16E13D80  00000000_16E15E98  00000000_177AEA3B
                                                                               
 8-B  00000000_00000000  00000000_16E16264  00000000_16E15BE0  00000000_977AE6D8
                                                                               
 C-F  00000000_16E10160  00000000_16E10968  00000000_977AE948  00000000_00000000
                                 


I verified the manual lik:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFHP3A04/1.4.1.1?SHELF=&DT=20050112153951&CASE=

which shows as

"If you use HANDLE CONDITION or HANDLE AID, you can avoid addressing problems by using SET(ADDRESS OF A-DATA) or SET(A-POINTER) where A-DATA is a structure in the LINKAGE SECTION and A-POINTER is defined with the USAGE IS POINTER clause. "

Could some body please help how I can avoid this abend. Is this like I have to use the HANDLE CONDITION in subprogram? but the subprogam is not a CICS program.

Please advice.

Thank you
_________________
Tx
Digger
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Apr 27, 2009 5:24 pm    Post subject: Reply with quote

MFdigger,

what is the AMODE and RMODE of the sub-program ZY12TXY?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Apr 27, 2009 5:32 pm    Post subject: Reply with quote

Digger,
good evening. you never fail to provide provocative questions. Made my day.

well first of all, you looked in the wrong error list - 4038 is an LE error,
Robert Sample will come along and provide you with the correct link
(because I don't have a link for LE errors).

This is an old COBOL II trick to load a W-S pointer with a W-S data address,
which we could not do until COBOL 3.

you have it a little (no alot) backwards:
CALLing Program:
Code:
CALL EZE-PROG USING EZEPNTR EZEPTRAD


Instead of EZEPNTR in your CALLing Program,
the code should be the reference of a W-S variable with usage pointer.
Instead of EZEPTRAD in your CALLing Program,
the code should be the reference of a W-S area/field.

also, there is no need to have a set pointer after the CALL,
that is the purpose of the CALL.

CALLed Program:
Code:

PROCEDURE DIVISION USING EZEPTR EZEPTRAD.                     
      SET EZEPTR TO ADDRESS OF EZEVAL-ZZWA8T1.     


The SET instruction should be
SET EZEPTR TO ADDRESS OF EZEPTRAD.


First, insure that the Pointer and the area/field used in the CALL
are contained in W-S of your CALLing Program
(If your CALLing Program has itself been CALLed,
your pointer and area can be in Linkage, but then there is no need,
because even in COBOL II you could set a linkage section POINTER
to a Linkage Section AREA/FIELD.

Second, modify your SET statement in the CALLed program as I indicated
repeated here:
SET EZEPTR TO ADDRESS OF EZEPTRAD.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Apr 27, 2009 5:48 pm    Post subject: Reply with quote

Or, are you trying to address an area of the CALLed program in the CALLing program?

if so,I will tell you how to clean up your code for that.

By the way
Quote:
CAUSE: LE/370 UNHANDLED COND(HELP 4038)


means: In LE (language environment) there was a condition that was not handled
- an abend code was issued -
you would get the same thing in batch if you used the same code.

nothing to do with CICS HANDLE API.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
MFdigger
Beginner


Joined: 09 Sep 2005
Posts: 124
Topics: 52
Location: Chicago

PostPosted: Tue Apr 28, 2009 11:11 am    Post subject: Reply with quote

Thank you Kolusu , Dick

I could able to resolve the issue:

1. When I compiled the subprogram with the COBOL compiler I was facing the abend 4038 when the control is trying to execute the CALL statement.

2. When I compiled the subprogram with the COBOL + CICS compiler (even though the subprogram is just a COBOL program) I could able to atleast enter into the Subprogram in the debugger but the POINTER varible EZEPTR in the subprogram is showing up as "UNABLE TO DETERMINE ADDR"

3. Now, when I changed the parameters for the calling program in the Main called program as below adding DFHEIBLK DFHCOMMAREA and compiling with COBOL+CICS compiler the issue got resolved.
Code:

MOVE 'ZY12TXY' TO EZE-PROG               
CALL EZE-PROG USING DFHEIBLK DFHCOMMAREA 
                          EZEPNTR EZEPTRAD     
SET ADDRESS OF ZZWA8T1 TO EZEPNTR.       
CONTINUE.


Dick:

I think you might want to suggest the same thing
Quote:

Or, are you trying to address an area of the CALLed program in the CALLing program?

if so,I will tell you how to clean up your code for that.


Thank you very much once again Smile
_________________
Tx
Digger
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 -> CICS and Middleware 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