IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DSNENQ command


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1788
Location: Bloomington, IL

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

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 16, 2013 9:18 pm
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
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

Moderator Emeritus


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

PostPosted: Wed Jan 16, 2013 10:39 pm
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
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: 1742
Location: Tirupur, India

PostPosted: Wed Jan 16, 2013 11:21 pm
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: 1742
Location: Tirupur, India

PostPosted: Wed Jan 16, 2013 11:41 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top