IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to check that a file opening in assembler is successful.


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gokuldass

New User


Joined: 18 Mar 2005
Posts: 48
Location: india

PostPosted: Tue May 03, 2005 11:47 pm
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
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

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

Yes you can. Check this link.
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: 106
Location: Cincinnati Ohio

PostPosted: Fri May 06, 2005 10:17 am
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: 48
Location: india

PostPosted: Sat May 14, 2005 7:48 pm
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

New User


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

PostPosted: Sat Jul 02, 2005 1:07 am
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: 48
Location: india

PostPosted: Tue Oct 11, 2005 11:52 am
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top