View previous topic :: View next topic
|
Author |
Message |
gokuldass
New User
Joined: 18 Mar 2005 Posts: 48 Location: india
|
|
|
|
how to check that a file opening in assembler is successful.
for example..
if i hadn't specified the go.dd statement in my jcl but i am trying to the file in my assembler program.. then how to check the open status..
this is an assembler question asked in convansys,chennai..
is there is anyway to declare a file status in assembler.. |
|
Back to top |
|
|
somasundaran_k
Active User
Joined: 03 Jun 2003 Posts: 134
|
|
Back to top |
|
|
David P
Active User
Joined: 11 Apr 2005 Posts: 106 Location: Cincinnati Ohio
|
|
|
|
Hi
When we use OPEN/CLOSE macro the return code is set in register 15. Hence you can test the register 15 to check if the open/close was successful.
Consider the code given below;
OPEN (VSAMFILE,(INPUT))
LTR R15,R15
BNZ BADOPEN
Please let me know if you have something to add to it..
regards,
David. |
|
Back to top |
|
|
gokuldass
New User
Joined: 18 Mar 2005 Posts: 48 Location: india
|
|
|
|
hi guys..
thanks for ur reply..
i had one more question i want to print the binary data. my input is binary and output should be binary.. |
|
Back to top |
|
|
Bharanidharan
New User
Joined: 20 Jun 2005 Posts: 86 Location: Chennai, India
|
|
|
|
You can use the TESTCB macro. 4th bit in 49th byte of DCBOFLGS will be set to 1. You can use "TM DCBOFLGS,X'10'" instruction to test if DS is opened.[/img] |
|
Back to top |
|
|
gokuldass
New User
Joined: 18 Mar 2005 Posts: 48 Location: india
|
|
|
|
Hi Bharani,
an u provide me an example to display the binary data.
Thanks in advance.
Gokul |
|
Back to top |
|
|
|