What to do after an error input / output VSAM?



High Level Assembler(HLASM) for MVS & VM & VSE

What to do after an error input / output VSAM?

Postby michel123 » Fri Apr 15, 2011 12:13 am

Hello,

For example, after an OPEN and a test SHOWCB by giving an error, we must stop the program and indicate the problem.

Example:
OPEN ESDSFILE

LTR R15,R15
BNZ BADOPCL

BADOPCL DS 0H
ST R15,SAVR15 SAVE R15 FOR LATER DISPLAY
*
SHOWCB ACB=ESDSFILE, X
AREA=RETCODE, X
LENGTH=4, X
FIELDS=ERROR

LTR R15,R15
BNZ ERROR

what to put in my paragraph ERROR?


Is there a particular macro to do this?



Thanks.
michel123
 
Posts: 58
Joined: Tue Dec 28, 2010 12:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: What to do after an error input / output VSAM?

 

Re: What to do after an error input / output VSAM?

Postby steve-myers » Fri Apr 15, 2011 12:33 am

Well, to start with you cannot use ERROR as both a data area and the target of a conditonal branch.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: What to do after an error input / output VSAM?

Postby enrico-sorichetti » Fri Apr 15, 2011 12:34 am

error is just a label in Your program,
You are free to do anything You like/feel useful to provide to the user.
You might probably want to display the return code and the reason code and exit nicely with a 16 RC
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2644
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: What to do after an error input / output VSAM?

Postby Schubie » Thu Apr 21, 2011 12:19 pm

Most likely you could (A) ABEND the program or (B) set a non-zero RETURN CODE and terminate the program
If a bug is located in a program product which simply cannot be fixed, it becomes a 'feature'. (IBM)
User avatar
Schubie
 
Posts: 10
Joined: Wed Jul 21, 2010 9:16 am
Location: Blue Ridge, GA USA
Has thanked: 0 time
Been thanked: 0 time

Re: What to do after an error input / output VSAM?

Postby steve-myers » Thu Apr 21, 2011 12:39 pm

Schubie wrote:Most likely you could (A) ABEND the program or (B) set a non-zero RETURN CODE and terminate the program

I think michel123 is looking for something like the SYNADAF macro for non-VSAM. It's possible that the "VSAMFAIL" routine, described here, might be able to do what he wants, but I've never used it, so I can't vouch for it. Unlike the "DAIRFAIL" routine, it does not appear to have an option to return its error message in a buffer, which limits its utility.

When I said I've never used it, I was not telling the whole truth. I used it once, for a TSO related capability of the program, but I was unhappy with its output and never tried it again.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: What to do after an error input / output VSAM?

Postby BillW » Fri Nov 11, 2011 1:15 am

Isn't there a dump macro to dump sections of your program/storage? You could then preface each area with something like:

DS 0D
BEGACB DC CL8"ACB>>>>>"
MYACB ACB whatever
ENDACB DC CL8"<<ENDACB"

You could do the same for RPL or any area you would like to see.
BillW
 
Posts: 20
Joined: Thu Nov 10, 2011 8:21 am
Has thanked: 0 time
Been thanked: 3 times


Return to Assembler

 


  • Related topics
    Replies
    Views
    Last post