Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
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    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

somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

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: 106
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: 48
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

New User


Joined: 20 Jun 2005
Posts: 86
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: 48
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 7 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts Sr SW Eng-Rocket Software (Assembler,... Kenneth Barton Lasky Mainframe Jobs 0 Fri Aug 25, 2017 12:29 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us