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: 10291
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: 2068
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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx to create a tso command Bharath Vikraman CLIST & REXX 1 Tue Aug 08, 2017 3:32 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am


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