HELP!! abendu4038 ERROR



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

HELP!! abendu4038 ERROR

Postby woaiwanchan » Wed Feb 24, 2010 10:14 am

In my cobol code when i use 'accept' keyword then the jcl return abendu4038.
What's the reason?

Thank advance
woaiwanchan
 
Posts: 6
Joined: Wed Feb 24, 2010 10:06 am
Has thanked: 0 time
Been thanked: 0 time

Re: HELP!! abendu4038 ERROR

 

Re: HELP!! abendu4038 ERROR

Postby woaiwanchan » Wed Feb 24, 2010 10:17 am

MY cobol code is
   ACCEPT A.
            ACEEPT B.
           ADD A TO B.
           DISPLAY B         

If i don't use the 'accept' keyword the programe run all right.
woaiwanchan
 
Posts: 6
Joined: Wed Feb 24, 2010 10:06 am
Has thanked: 0 time
Been thanked: 0 time

Re: HELP!! abendu4038 ERROR

Postby dick scherrer » Wed Feb 24, 2010 10:35 am

Hello and welcome to the forum,

You have not provided enough for someone to use to help you. . . Also, there is diagnostic information available that you have not shown.

The posted code could not compile, so for someone to help, you need to post the actual code. Do not key codeinto a topic - use copy/pasteto preventtypo's. Then use the Code tag to preserve alignment and improve readability.

How are A and B defined? What is the jcl and input data ?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: HELP!! abendu4038 ERROR

Postby woaiwanchan » Wed Feb 24, 2010 10:55 am

This is my cobol code
IDENTIFICATION DIVISION.
         PROGRAM-ID. ADDNUM.
         ENVIRONMENT DIVISION.
         WORKING-STORAGE SECTION.
         01 A PIC 9(10).
         01 B PIC 9(10).
         01 C PIC 9(10).
         PROCEDURE DIVISION.
                ACCEPT A.
                ACCEPT B.
        *      MOVE 3 TO A.    (if use this that would be success)
        *      MOVR 4 TO B.
                ADD A,B GIVING C.
                DISPLAY A " ADD " B '=' C.
                 STOP RUN.


jcl
 //JOBADD      JOB ,LEROY,CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),NOTIFY=EXT2231
 // STEP1        EXEC  PGM=ADD,RESION=128M
//STEPLIB       DD  DSN=EXT2231.MY.COBOL.LOAD,DISP=SHR
//SYSPRINT     DD SYSOUT=*
//
woaiwanchan
 
Posts: 6
Joined: Wed Feb 24, 2010 10:06 am
Has thanked: 0 time
Been thanked: 0 time

Re: HELP!! abendu4038 ERROR

Postby woaiwanchan » Wed Feb 24, 2010 11:04 am

Image
woaiwanchan
 
Posts: 6
Joined: Wed Feb 24, 2010 10:06 am
Has thanked: 0 time
Been thanked: 0 time

Re: HELP!! abendu4038 ERROR

Postby dick scherrer » Wed Feb 24, 2010 11:16 am

Hello,

There is no "input" for the ACCEPTs. This causes the abend.

When you move literals, the ACCEPT is not executed and there is no abend.

To use your code with the ACCEPTs, you need to include a //SYSIN DD * with the next 2 statements containing a 10-digit number.

Keep in mind that in "real" applications, ACCEPT is nearly never permitted, but is ok for a training exercise.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: HELP!! abendu4038 ERROR

Postby woaiwanchan » Wed Feb 24, 2010 11:31 am

Very thanks

Where are you from? I come from china .now i'm only a intern and i will try hard like you(dick scherrer )
woaiwanchan
 
Posts: 6
Joined: Wed Feb 24, 2010 10:06 am
Has thanked: 0 time
Been thanked: 0 time

Re: HELP!! abendu4038 ERROR

Postby dick scherrer » Thu Feb 25, 2010 1:08 am

You're welcome :)

I'm from the US.

now i'm only a intern
We all were beginners at one time. . .

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: HELP!! abendu4038 ERROR

Postby Robert Sample » Thu Feb 25, 2010 1:10 am

dick scherrer wrote:We all were beginners at one time. . .

d
Cue up the music ...


A long, long time ago in a galaxy far, far away ....

:D
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: HELP!! abendu4038 ERROR

Postby dick scherrer » Thu Feb 25, 2010 1:49 am

A long, long time ago in a galaxy far, far away ....
When you saw this scroll up the movie screen in 1977 or there about, did it remind you of something from much earlier . . .?

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post