View previous topic :: View next topic
|
Author |
Message |
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Hi,
How do we check the file status code in Assembler???
I mean, if I open a file, then in COBOL we check if the open was sucessful using file status code, which we mention in SELECT clause.
How do we do that in Assembler??? how do I check if my file operation was sucessful???
Thanks for all the info you can provide.
ap_mainframes |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
Example:
OPEN IN01(INPUT)
LTR R15,R15 ...CODE IN R15
BZ DoSomeThing ...R15 = Zero = Ok
... ... ...
CLOSE IN01
LTR R15,R15 ...CODE IN R15
BZ StopRun ...R15 = Zero = Ok ...R15 = NULL IST OK |
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Thanks! But why only Register 15???
Cant it be anything other than R15 ???Does the return code come in R15 only??? Why not in other registers??? |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Cause you are using IBM-Systemmacros. These macros or programmse alle apply to the standard IBM Register conventions.
Regards, UmeySan |
|
Back to top |
|
|
|