This may help - sample using an ispf service:
/* rexx */
arg prefix
Address ISPExec
major = '*'
minor = prefix
save = 'Z'random(99999)
if right(minor,1) /= '*' then minor = minor'*'
"QueryENQ Qname(major) Rname(minor) Save("save") XSYS Table(xyz)"
qrc = rc
'TBEnd xyz'
say 'rc:' qrc
if qrc = 2 then say 'Datasets under hlq:' prefix 'are open and enqueued.'
if sysvar('syspref') = '' then save = sysvar('sysuid')'.'save
"browse dataset("save".enqlist)"
Address TSO
'delete' save'.enqlist'
On Tue, May 6, 2025 at 11:56 AM Steve Thompson <[email protected]> wrote:
>
> Have you tried BPXWDYN? I think your Java code can call it.
>
> HTHs, Steve Thompson
>
> On 5/6/2025 12:29 PM, Peter Vander Woude wrote:
> > We have a file transfer tool, that is used to send data to z/OS, however if
> > the dataset is a gdg, and there is a disp=old on the gdg, the dynamic
> > allocation fails and the transfer job also fails.
> >
> > We can have them run a script prior to the actual transfer and I want to be
> > able to check if there is an enq against the gdg base. Now SYSDSN will
> > give me that, however, if there are multiple migrated gds's they all get
> > recalled, which I do not want to do.
> >
> > I'm having problems with LISTDSI to say that the gdg base is a valid
> > dataset. Does anybody know how check if there is an enq against the gdg
> > base so I can code the script to pause and check again. Execution timing
> > is critical as the mainframe processing runs quite often, that process
> > these gdg's.
> >
> > They are migrating from one transfer solution, which may have an exit, or
> > process, in place to deal with gdg enq's and they don't get the file
> > allocation failure there, but we are moving away from that product to the
> > newer one.
> >
> > This method cannot be using ispexec, as the exec will not be running under
> > ispf. It will be running under uss, as the invoking programs are java.
> >
> > Thanks,
> > Peter
> >
> > p.s. sorry if the description is muddled up.
> > pps. I only get a single digest e-mail so I'll check back periodically, or
> > see what responses there are, in the daily digest.
> >
> > ----------------------------------------------------------------------
> > For IBM-MAIN subscribe / signoff / archive access instructions,
> > send email to [email protected] with the message: INFO IBM-MAIN
>
> --
> Regards,
> Steve Thompson
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
--
Lionel B. Dyck <><
Website:https://github.com/lbdyck
"Worry more about your character than your reputation. Character is
what you are, reputation merely what others think you are." - John
Wooden
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN