|
"Haase, Justin C." <justin.haase@xxxxxxxxxxxx> wrote:
> If I wanted to get rid of *EVERY* virtual 5250 session on the
> system - every QPADEV*, every incorrectly named session that
> people have created with Client Access - what would be the easiest
> way to get rid of them all and start over? On some older systems
> which have been around for ages there's sometime hundreds of
> oddly-named sessions, and I'd just like to get rid of them ALL and
> start over, either with defined session names mapped to PCs, or
> creating 100 devices and turning autoconfig off.
>
> Any thoughts or assistance is appreciated! Thanks!
Justin,
Here's the source of a CL program I wrote recently to do something very
similar. The program is intended to be run periodically to keep the number
of virtual devices down. It makes a list in a user space of all virtual
display devices that are currently varied off, then works down the list
deleting them. It currently has a hard-coded check in to make sure it only
deletes devices whose names begin with a "Q". To remove this check simply
delete the line ...
if (%sst(&devName 1 1) *eq q) do
... and the following "enddo".
You're welcome to make use of it, entirely at your own risk of course. If
you're nervous about running it you could do so under debug, watching
"&devName" and breaking on the "dltdevd &devName". You can then see what
it's about to do before it does it. This is the only line that has a
potentially damaging payload.
*************** Beginning of data ***********************************
pgm
dcl &text *char 50 +
VALUE('User space to hold device list')
dcl &vrtDsp *char 40 value(*VRTDSP)
dcl &genHdr *char 16
dcl &lstoff *int
dcl &nbrEnt *int
dcl &sizEnt *int
dcl &ptr *int
dcl &entIdx *int
dcl &cfgd0200 *char 142
dcl &devName *char 10
/* Global message monitor */
monmsg cpf0000 exec(goto xAbort)
/* Use QUSCRTUS API to create a user space to hold device list */
call quscrtus ('CFGLST QTEMP ' +
' ' +
x'00010000' +
x'00' +
'*ALL ' +
&text +
'*YES ' +
x'00000000')
/* Use QDCLCFGD API to retrieve list of configuration descriptions */
call qdclcfgd ('CFGLST QTEMP ' +
'CFGD0200' +
'*DEVD ' +
&vrtdsp +
'*EQ *VARYOFF ' +
x'00000000')
/* Get generic header information from user space */
call qusrtvus ('CFGLST QTEMP ' +
x'0000007D' +
x'00000010' +
&genHdr +
x'00000000')
chgvar &lstOff %bin(&genHdr 1 4)
chgvar &nbrEnt %bin(&genHdr 9 4)
chgvar &sizEnt %bin(&genHdr 13 4)
/* Get list entries from user space */
chgvar &ptr (&lstoff + 1)
chgvar &entIdx 1
nxtEnt:
call qusrtvus ('CFGLST QTEMP ' +
&ptr +
&sizEnt +
&cfgd0200 +
x'00000000')
chgvar &devName %sst(&cfgd0200 5 10)
/* Delete virtual device - currently names beginning Q only */
if (%sst(&devName 1 1) *eq q) do
dltdevd &devName
monmsg cpf0000
enddo
if (&entIdx *lt &nbrEnt) do
chgvar &entIdx (&entIdx + 1)
chgvar &ptr (&ptr + &sizEnt)
goto nxtEnt
enddo
/* End of list - bypass error routine and terminate */
goto zEnd
xAbort:
/* Use QMHMOVPM API to move diagnostic message up program stack */
call qmhmovpm (' ' +
'*DIAG ' +
x'00000001' +
'*' +
x'00000001' +
x'0000000000000000')
monmsg cpf0000
/* Use QMHRSNEM API to resend escape message to caller */
call qmhrsnem (' ' +
monmsg cpf0000
zEnd:
endpgm
****************** End of data *************************
--
Dave...
_________ ,___o
__________ _\ <;_ http://www.audax.uk.net
___________ (_)/ (_) http://www.twickenhamcc.co.uk
=======================================================
The opinions expressed in this communication are my own and do not
necessarily reflect those of my employer.
______________________________________________________________________
This message may contain confidential information which may also be legally
privileged and is intended only for the use of the parties to whom it is
addressed. If you are not an intended recipient you are hereby notified that
any disclosure, copying, distribution or use of any information in this e-mail
is strictly prohibited. If you receive this message in error please notify the
sender by return e-mail and then destroy it. Further, we make every endeavour
to keep our network free from viruses. However, you do need to verify that this
e-mail and any attachments are free of viruses as we can take no responsibility
for any computer viruses which might be transferred by way of this e-mail. All
information and attachments remain the property of Stolt Offshore Group and
should be held as confidential.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.