|
Here is a quick&dirty example using QWVOLACT API. Pass this program a
26-byte job name, or '*'.
//-----------------------------
// Display Activations In Job
//-----------------------------
H option( *srcstmt ) dftactgrp( *yes )
FDSPACTJOB CF E workstn sfile( ZZ01L : SfileRecno )
D QGYCLST PR extpgm( 'QGYCLST' )
D ListHandle 4A
D ErrorCode 10I 0 const
D QWVOLACT PR extpgm( 'QWVOLACT' )
D Receiver 8192A
D Length 10I 0 const
D MistInfo 80A
D ToReturn 10I 0 const
D Format 8A const
D GrpNo 10I 0 const
D JobName 26A const
D JobId 16A const
D ErrorCode 142A
D QMHSNDPM PR extpgm( 'QMHSNDPM' )
D MsgId 7A const
D MsgFile 20A const
D MsgData 126A const
D MsgLength 10I 0 const
D MsgType 10A const
D MsgStack 10A const
D MsgCounter 10I 0 const
D MsgKey 4A const
D ErrorCode 10I 0 const
D Act S 32704A
D Act@ S * inz( %addr( Act ))
D Act_DS DS based( Act@ )
D GrpName 10A
D 6A
D GrpNo 10I 0
D 12A
D Pgm 10A
D Lib 10A
D Type 1A
D ApiError DS
D ErrorAvail 10I 0 inz(142)
D 10I 0
D ErrorId 7A inz
D 1A
D ErrorData 126A
D ListInfo DS 80
D ListTotal 10I 0
D ListReturned 10I 0
D ListHandle 4A
D ListRecLen 10I 0
D ListComplete 1A
D ListDate 13A
D ListStatus 1A
D 1A
D ListLength 10I 0
D ListFirst 10I 0
D 40A
D MsgFile S 20A inz( 'QCPFMSG QSYS' )
D SfileRecno S 10I 0 inz( 0 )
C *entry plist
C parm ParmJob 26
/free
*INLR = *on;
if ParmJob = *blanks;
ParmJob = '*';
endif;
QWVOLACT( Act : %size( Act ) : ListInfo : 511 :
'RACT0100' : -1 : ParmJob : ' ' : ApiError );
if ErrorId <> *blanks;
QMHSNDPM( ErrorId : MsgFile : ErrorData : %size( ErrorData ) :
'*DIAG' : '*' : 2 : ' ' : 0 );
return;
endif;
dow ListReturned > 0;
S_ActNo = GrpNo;
S_ActName = GrpName;
S_PgmName = Pgm;
S_LibName = Lib;
if Type = '0';
S_PgmType = '*PGM';
elseif Type = '1';
S_PgmType = '*SRVPGM';
elseif Type = '2';
S_PgmType = '*JVAPGM';
else;
S_PgmType = Type;
endif;
SfileRecno = SfileRecno + 1;
write ZZ01L;
ListReturned = ListReturned - 1;
Act@ = Act@ + ListRecLen;
enddo;
exfmt ZZ01;
QGYCLST( ListHandle : 0 );
/end-free
A DSPSIZ(24 80 *DS3)
A CHGINPDFT
A PRINT(*LIBL/QSYSPRT)
A INDARA
A R ZZ01L SFL
A S_ACTNO 10Y 0O 2 2EDTCDE(3)
A S_ACTNAME 10A O 2 15
A S_PGMNAME 10A O 2 28
A S_LIBNAME 10A O 2 41
A S_PGMTYPE 7A O 2 54
A R ZZ01 SFLCTL(ZZ01L)
A SFLSIZ(0023)
A SFLPAG(0022)
A SFLDSP
A SFLDSPCTL
A 99 SFLEND
A 1 6'Number'
A DSPATR(HI)
A DSPATR(UL)
A 1 16'Name'
A DSPATR(HI)
A DSPATR(UL)
A 1 28'Program'
A DSPATR(HI)
A DSPATR(UL)
A 1 41'Library'
A DSPATR(HI)
A DSPATR(UL)
A 1 54'Type'
A DSPATR(HI)
A DSPATR(UL)
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.