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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

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