Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Open Flat File status using REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Sridhar R

New User


Joined: 11 Dec 2010
Posts: 20
Location: India

PostPosted: Fri Sep 07, 2012 1:24 pm    Post subject: Open Flat File status using REXX
Reply with quote

I have a flat file which i'm reading in my REXX code. Here before opening that file I want to check whether that the same file is using by some other resource(user). Could anyone help me??

For Eample :

I have file name called 'TEST.SMS.FILE'

user_list = 'TEST.SMS.FILE'

"ALLOC DA('"user_list"') F(ulist) OLD"
queue 'xxxxxxxxxxx'
queue 'yyyyyyyyyyy'

"EXECIO "QUEUED()" DISKW ulist (FINIS"

But before I'm into this file I want to check whether the same file is using by any user/resource.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10257
Location: italy

PostPosted: Fri Sep 07, 2012 1:45 pm    Post subject: Reply to: Open Flat File status using REXX
Reply with quote

in IT terminology and consistency are essential for effective communication

You describe Your <requirement> as READ,
but then Your code shows a write.

review Your understanding of dataset disposition both for JCL-DD and ALLOC

using OLD will automatically let You have the dataset under exclusive control
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2038
Location: Silicon Valley

PostPosted: Fri Sep 07, 2012 9:15 pm    Post subject: Reply to: Open Flat File status using REXX
Reply with quote

Quote:
I want to check whether that the same file is using by some other resource(user)


Depending on your skill, use either
1. the QUERYENQ service of ISPF. The QNAME is SYSDSN and the RNAME is your fully qualified dataset name.

or
2. use the GQSCAN macro. See "MVS Assembler Services Guide"
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 pm
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us