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 

Synad and put in Assembler

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
k_sharma
Beginner


Joined: 14 Aug 2003
Posts: 10
Topics: 3
Location: Dallas, US

PostPosted: Thu Aug 14, 2003 2:07 am    Post subject: Synad and put in Assembler Reply with quote

I am using a Sequential file for OUTPUT in assembler code. For this I am using PUT to write data to output. But after using PUT how can I check the return code whether PUT was successful or not.

Somewhere I heard that we can use
LTR r15,r15. If r15 is zero it will be ok. But when I debuged the program it is giving some address in R15 and also PUT is successful. I don't know whether we can use R15 or not.

There is also one option SYNAD in DCB for error routines. Can anybody tell me how we can check the return code after PUT.
Back to top
View user's profile Send private message
chaoslord
Beginner


Joined: 20 Aug 2003
Posts: 2
Topics: 0

PostPosted: Wed Aug 20, 2003 3:00 pm    Post subject: Reply with quote

Hi k_sharma,

I don't know, if the SYNAD disturbs the normal error-checking,
but I do it always that style :

To check a PUT Statement on errors do the following :

Code:

     OPEN OUTPUT
...
LOOP001 DS 0H
        GET INPUT,INREC
...
DO-PROCESSING-TILL-IT's-DONE
...
        PUT OUTPUT,OUTREC
        LTR 15,15
        BNZ ERROR
        B    LOOP001
EOFINP  DS   0H
...

OUTPUT DCB MACRF=PM,DDNAME=OUTPUT,RECFM=FB,LRECL=80

_________________
Azzembler RuleZ !
Back to top
View user's profile Send private message Visit poster's website
DaveyC
Moderator


Joined: 02 Dec 2002
Posts: 151
Topics: 3
Location: Perth, Western Australia

PostPosted: Thu Aug 21, 2003 8:09 am    Post subject: Reply with quote

Testing R15 after a put is useless. To be honest, I wouldn't worry about it too much. If the put is in error your program will abend. You could write a SYNAD exit, but I never bother.
_________________
Dave Crayford
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming 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