|
Help me out here. How can this be used to get both the IBM i and the S/36
name?
Is one to assume that any object with type *DEVD and attribute of DSPVRT is
a S/36 name?
On Fri, Aug 18, 2023 at 11:19 AM K Crawford <kscx3ksc@xxxxxxxxx> wrote:
Had the same issue so some time back I wrote a CLLE. in a nutshell itwill
create an out file of all of the devices and anything not used in thepast
90 days delete them. We run this monthly.proprietary.
Just to save time here is the code, I don't think anything is
*/
PGM
/*
***********************************************************************
/* Kerwin Crawford 2018/06/26*/
*/
/* Remove old device descriptions done due to the limitations of
*/
/* s36 device name based on 90 days in past
*/
/*
***********************************************************************
*/
/*
#######################################################################
/**/
=======================================================================
/* Define Varables*/
-------------------------------------------- */
/* System information etc */
DCL VAR(&CURUSR) TYPE(*CHAR) LEN(10)
DCL VAR(&DATETIME) TYPE(*CHAR) LEN(20) /* +
CCYYMMDDHHNNSSXXXXXX */
DCL VAR(&HHMMSS) TYPE(*CHAR) LEN(6)
DCL VAR(&CCYYMMDD) TYPE(*CHAR) LEN(8)
DCL VAR(&YYMMDD) TYPE(*CHAR) LEN(6)
DCL VAR(&wrk_yymmdd) TYPE(*CHAR) LEN(6)
DCL VAR(&CUTOFF) TYPE(*DEC) LEN(8 0)
DCL VAR(&CUTOFFA) TYPE(*CHAR) LEN(8)
DCL VAR(&LILIAN) TYPE(*CHAR) LEN(4)
DCL VAR(&JUNK1) TYPE(*CHAR) LEN(8)
DCL VAR(&JUNK2) TYPE(*CHAR) LEN(23)
DCL VAR(&WDATE) TYPE(*CHAR) LEN(8)
/*
#######################################################################
/**/
=======================================================================
*/
DCLF FILE(QS36F/wrkclndevd) RCDFMT(QLIDOBJD) +
ALWNULL(*YES)
/*
#######################################################################
/**/
=======================================================================
/* Get Sytem Information*/
-------------------------------------- */
RTVJOBA CURUSER(&CURUSR) DATETIME(&DATETIME)
CHGVAR VAR(&CCYYMMDD) VALUE(%SST(&DATETIME 1 8))
CHGVAR VAR(&YYMMDD) VALUE(%SST(&DATETIME 3 6))
CHGVAR VAR(&HHMMSS) VALUE(%SST(&DATETIME 9 6))
/* =============================================================== */
/* |vvv vvv */
/* | Get cutoff date */
/* | Get local time from system: When this call is complete, */
/* | &LILIAN will contain the number of days between */
/* | today and Oct 14, 1582. */
CALLPRC PRC(CEELOCT) PARM(&LILIAN &JUNK1 &JUNK2 *OMIT)
/* | Subtracting 90 from &LILIAN will produce cutoff date */
CHGVAR VAR(%BIN(&LILIAN)) VALUE(%BIN(&LILIAN) - 90)
/* | Convert lillian to yymmdd date */
CALLPRC PRC(CEEDATE) PARM(&LILIAN 'YYMMDD' &WDATE *OMIT)
CHGVAR VAR(&CUTOFF) VALUE(&WDATE)
CHGVAR VAR(&CUTOFFA) VALUE(&WDATE)
/* |^^^ ^^^ */
/* =============================================================== */
/*
#######################################################################
/**/
=======================================================================
/* create/populate the work file*REPLACE)
----------------------------------------- */
DSPOBJD OBJ(*ALL/*all) OBJTYPE(*DEVD) OUTPUT(*OUTFILE) +
OUTFILE(qs36f/wrkclndevd) OUTMBR(*FIRST
*/
/*
#######################################################################
/**/
=======================================================================
/* read the work fileSTATUS(*OFF)
---------------------------------------------------- */
GETNEXTROW:
RCVF
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(THEEND))
CHGVAR VAR(&WRK_YYMMDD) VALUE(%SST(&ODUDAT 5 2) *TCAT +
%SST(&ODUDAT 1 2) *TCAT %SST(&ODUDAT 3 2))
if cond(&odobtp *eq '*DEVD') then(do)
if cond(&odobat *eq 'DSPVRT') then(do)
IF COND(&WRK_YYMMDD *LE &cutoffa) THEN(DO)
VRYCFG CFGOBJ(&ODOBNM) CFGTYPE(*DEV)
MONMSG MSGID(CPF26AF CPF26B6 CPF26B7 CPF2640 +*/
CPF2659)
DLTDEVD DEVD(&ODOBNM)
MONMSG MSGID(CPF2114 CPF2668)
enddo /* how long scence the last usage */
enddo /* is it a display device */
enddo /* is it a device */
GOTO CMDLBL(GETNEXTROW)
/*
#######################################################################
/**/
=======================================================================
/* End the Programtable.
------------------------------------------------------- */
THEEND: ENDPGM
On Fri, Aug 18, 2023 at 9:27 AM Rob Berendt <robertowenberendt@xxxxxxxxx
wrote:
Object Type Library
QS36ENV *S36 #LIBRARY
I'm not seeing any APIs for that beast.
On Fri, Aug 18, 2023 at 9:11 AM DEnglander--- via MIDRANGE-L <
midrange-l@xxxxxxxxxxxxxxxxxx> wrote:
In the System/36 environment there is an IBM i to S/36 device ID
SQLtheCommand is CHGS36 then take S/36 display IDs. Then a list is shown of
equivalencies. Does anyone know how to get that list sorted by I5/OS
Display ID instead of S/36 ID?
Or, does anybody know where that is stored so I could possibly use
torecipient.
issort the list?
We have hundreds of entries and the table filled up yesterday, and it
alot easier to maintain it when sorted by i5/OS ID.attachments
Thank you,
Doug
"CONFIDENTIALITY NOTICE: This e-mail transmission (and/or the
accompanying it) contain confidential information belonging to thesender.
The information is intended only for the use of the intended
notifyIfreliance
you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution or the taking of any action in
law.on the contents of the information is strictly prohibited. Any
unauthorized interception of this transmission is illegal under the
If you have received this transmission in error, please promptly
mailingthetransmission."
sender by reply e-mail, and then destroy all copies of the
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
relatedlistrelated
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
listquestions.--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
listquestions.
--
Kerwin Crawford
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.