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
 
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: 10327
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: 2086
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm

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