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
 

 

DSNENQ command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Santty

New User


Joined: 20 Nov 2007
Posts: 37
Location: USA

PostPosted: Wed Jan 16, 2013 9:13 pm    Post subject: DSNENQ command
Reply with quote

I used the command DSNENQ in front of the dataset in order to get the details

Please Correct me if i am wrong in the above concept

DSNENQ dataset

When i used this command i got a error message as

Resource: SYSDSN 'datasetname' not allocated

Can you please let me know what went wrong in that.
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Wed Jan 16, 2013 9:15 pm    Post subject:
Reply with quote

What does the FDR documentation say?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Jan 16, 2013 9:18 pm    Post subject: Reply to: DSNENQ command
Reply with quote

DSNENQ is not a vanilla IBM provided command

if an in house tool
the best source of info will be <the people> who provided it

if a command of some some foreign product
the best source of info will be the documentation of THAT product
Back to top
View user's profile Send private message
Santty

New User


Joined: 20 Nov 2007
Posts: 37
Location: USA

PostPosted: Wed Jan 16, 2013 9:51 pm    Post subject: Reply to: DSNENQ command
Reply with quote

Thank you !!!

Is there a tool that will allow to determine if the following file has been lock by another process, since the following file resides on virtual tape drive
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jan 16, 2013 10:39 pm    Post subject:
Reply with quote

Hello,

Quote:
used the command DSNENQ in front of the dataset in order to get the details
Which details will this "get"?

If something has the file allocated with disp=old, it will not be available to some other process that specifies disp=old also . . .

Possibly i misunderstand the question.
Back to top
View user's profile Send private message
Santty

New User


Joined: 20 Nov 2007
Posts: 37
Location: USA

PostPosted: Wed Jan 16, 2013 10:47 pm    Post subject: Reply to: DSNENQ command
Reply with quote

DSNENQ= would make data sets inaccessible
ENQ= would prevent new allocations, expansions and deletions of all
data sets.
NOTE: DSNENQ= options are supported on the SNAP TYPE=FDR
command when creating the snap volume to ensure data set and VTOC integrity.

Im looking for a tool/command to determine if the file has been locked by another process ....
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Jan 16, 2013 11:21 pm    Post subject:
Reply with quote

Hello,
You could try the command
TSO ISRDDN E
then on the following panel, enter the dataset(in this case HGWELLS.JC*) which you want to inquiry,
The ones in red indicate exclusive hold and yellow ones indicate share.

Is this what you are looking for? O_o

Code:
                         System ENQ Status                         Row 1 of 3
Command ===>                                                  Scroll ===> PAGE
                                                                               
       Scroll LEFT or RIGHT to see type or system name.                       
                                                                               
Major name prefix . . .           (SYSDSN, SPFEDIT, etc)                       
Minor name prefix . . . HGWELLS.JC                                   (dsn etc)
Address id prefix . . .           (Job name, User id, etc)                     
System prefix . . . . .           (System name)                               
  Major      Minor                                                  Job Name   
+----------+------------------------------------------------------+----------+
| SPFEDIT  | HGWELLS.JCL.CNTL2                           DFSORT   | HGWELLS  |
| SYSDSN   | HGWELLS.JCL.CNTL                                     | HGWELLS  |
| SYSDSN   | HGWELLS.JCL.CNTL2                                    | HGWELLS  |
+----------+------------------------------------------------------+----------+
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Jan 16, 2013 11:41 pm    Post subject:
Reply with quote

You could also use this below REXX,
Code:
/* REXX */                                                             
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"                                 
TABNM="T"SPACE(TRANSLATE(TIME()," ",":"),0)                             
/*QNAM="SYSZLOGR" */                                                   
QNAM="*"                                                               
RNAM="HGWELLS.J*"                                      /*PUT YOUR DATASET HERE */                                             
ADDRESS ISPEXEC "QUERYENQ TABLE("TABNM") QNAME(QNAM)",                 
"RNAME(RNAM) XSYS LIMIT(0)"                                             
SELECT                                                                 
WHEN RC=4 THEN DO                                                       
SAY 'QUERY OF CONNECT ENDED BY LIMIT'                                   
EXIT                                                                   
END                                                                     
WHEN RC=8 THEN DO                                                       
SAY 'NO DATA FOUND'                                                     
EXIT                                                                   
END                                                                     
WHEN RC>8 THEN DO                                                       
SAY 'MAJOR ERROR ON QUERY' RC                                           
EXIT                                                                   
END                                                                     
OTHERWISE                                                               
NOP                                                                     
END                                                                     
ADDRESS ISPEXEC "TBTOP "TABNM                                           
ADDRESS ISPEXEC "TBSKIP "TABNM                                         
DO CN=1 WHILE RC=0                                                     
SAY "================================================================" 
SAY "| DATASET NAME ->" LEFT(ZENRNAME,44)                          "|" 
SAY "| ------------" RIGHT("|",49)                                     
SAY "| ENQ JOB NAME ->" LEFT(ZENJOB,44)                            "|" 
SAY "| DISPOSISTION ->" LEFT(ZENDISP,44)                           "|" 
SAY "| HOLD         ->" LEFT(ZENHOLD,44)                           "|" 
SAY "| SYSTEM       ->" LEFT(ZENSYST,44)                           "|" 
SAY "| SCOPE        ->" LEFT(ZENSCOPE,44)                          "|" 
SAY "| QUEUE NAME   ->" LEFT(ZENQNAME,44)                          "|" 
SAY "| STEPNAME     ->" LEFT(ZENSTEP,44)                           "|" 
SAY "| GLOBAL       ->" LEFT(ZENGLOBAL,44)                         "|" 
SAY "================================================================" 
ADDRESS ISPEXEC "TBSKIP "TABNM                                         
END                                                                     
ADDRESS ISPEXEC "TBEND "TABNM                                           
EXIT                                                                   


Output:
Code:
================================================================
| DATASET NAME -> HGWELLS.JCL.PS.FILE                          |
| ------------                                                 |
| ENQ JOB NAME -> HGWELLS                                      |
| DISPOSISTION -> EXCLU                                        |
| HOLD         -> OWN                                          |
| SYSTEM       -> WELS                                         |
| SCOPE        -> SYSTEMS                                      |
| QUEUE NAME   -> SPFEDIT                                      |
| STEPNAME     ->                                              |
| GLOBAL       -> ZENGLOBAL                                    |
================================================================
================================================================
| DATASET NAME -> HGWELLS.JCL.CNTL                             |
| ------------                                                 |
| ENQ JOB NAME -> HGWELLS                                      |
| DISPOSISTION -> SHARE                                        |
| HOLD         -> OWN                                          |
| SYSTEM       -> WELS                                         |
| SCOPE        -> SYSTEM                                       |
| QUEUE NAME   -> SYSDSN                                       |
| STEPNAME     ->                                              |
| GLOBAL       -> ZENGLOBAL                                    |
================================================================
Back to top
View user's profile Send private message
Santty

New User


Joined: 20 Nov 2007
Posts: 37
Location: USA

PostPosted: Thu Jan 17, 2013 2:14 am    Post subject: Reply to: DSNENQ command
Reply with quote

Thank you vasanthz !!!
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts COMPARE command sivatechdrive TSO/ISPF 7 Fri Sep 16, 2016 4:31 pm
No new posts I am unable to use SWAPBAR ON command... mrsidhu12 TSO/ISPF 3 Thu Sep 01, 2016 1:10 pm


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