Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
how to check that a file opening in assembler is successful.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER
Author Message
gokuldass

New User


Joined: 18 Mar 2005
Posts: 45
Location: india

PostPosted: Tue May 03, 2005 11:47 pm    Post subject: how to check that a file opening in assembler is successful.
Reply with quote

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
View user's profile Send private message
References
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 141

PostPosted: Wed May 04, 2005 12:39 am    Post subject:
Reply with quote

Yes you can. Check this link.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2D510/APPENDIX1.2.1?SHELF=DGT2BK21&DT=20020110113324

hth
-Som
Back to top
View user's profile Send private message
David P

Active User


Joined: 11 Apr 2005
Posts: 110
Location: Cincinnati Ohio

PostPosted: Fri May 06, 2005 10:17 am    Post subject:
Reply with quote

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
View user's profile Send private message
gokuldass

New User


Joined: 18 Mar 2005
Posts: 45
Location: india

PostPosted: Sat May 14, 2005 7:48 pm    Post subject: Re: how to check that a file opening in assembler is success
Reply with quote

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
View user's profile Send private message
Bharanidharan

Active User


Joined: 20 Jun 2005
Posts: 100
Location: Chennai, India

PostPosted: Sat Jul 02, 2005 1:07 am    Post subject: Re: how to check that a file opening in assembler is success
Reply with quote

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
View user's profile Send private message
gokuldass

New User


Joined: 18 Mar 2005
Posts: 45
Location: india

PostPosted: Tue Oct 11, 2005 11:52 am    Post subject: Can you plz provide me an example
Reply with quote

Hi Bharani,

an u provide me an example to display the binary data.

Thanks in advance.
Gokul
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER All times are GMT + 6 Hours
Page 1 of 1