> Tech > Figure 3B

Figure 3B

Tech - Par Renaud ROSSET - Publié le 24 juin 2010
email

Programme PrtObjAut1 de traitement de la commande PrtObjAut

/* =============================================================== */
/* = Program....... PrtObjAut1 = */
/* = Source type... CLP = */
/* = Type.......... Command processing program for PrtObjAut = */
/* = Description... Print Object Authorities = */
/* = --------------------------------------------------------- = */
/* = Parameters

Figure 3B

= */
/* = = */
/* = &Obj Input Qualified object name = */
/* = = */
/* = &ObjType Input Object type = */
/* =============================================================== */

Pgm (
&Obj
&ObjType
)

/* =============================================================== */
/* = Variable declarations = */
/* =============================================================== */
Dcl &Obj * Char ( 20 )
Dcl &ObjType * Char ( 10 )
Dcl &ObjName * Char ( 10 )
Dcl &MsgID * Char ( 7 )
Dcl &MsgF * Char ( 10 )
Dcl &MsgFLib * Char ( 10 )
Dcl &MsgDta * Char ( 100 )
Dcl &ErrorFlag *Lgl

/* =============================================================== */
/* = File declaration = */
/* =============================================================== */
DclF QADspObj

/* =============================================================== */
/* = Global error monitor = */
/* =============================================================== */
MonMsg ( CPF0000 MCH0000 ) Exec( +
GoTo Error )

/* =============================================================== */
/* = Retrieve list of objects to a file = */
/* =============================================================== */
ChgVar &ObjName ( %Sst( &Obj 1 10 ) )
ChgVar &ObjLib ( %Sst( &Obj 11 10 ) )
DspObjD Obj( &ObjLib/&ObjName ) +
ObjType( &ObjType ) +
Detail( *Basic ) +
Output( *OutFile ) +
OutFile( QTemp/ObjList )

/* =============================================================== */
/* = Read records in file ObjList and print authorities = */
/* =============================================================== */
OvrDbF File( QADspObj ) +
ToFile( QTemp/ObjList )

ReadBegin:

RcvF RcdFmt( QLiDObjD )
MonMsg ( CPF0864 ) Exec( +
GoTo Exit )
DspObjAut Obj( &ODLbNm/&ODObNm ) +
ObjType( &ODObTp ) +
Output( *Print )
GoTo ReadBegin

/* =============================================================== */
/* = Error handler = */
/* =============================================================== */
Error:
If ( &ErrorFlag ) +
Do
SndPgmMsg MsgID( CPF9897 ) +
MsgF( QSys/QCPFMsg ) +
MsgDta( ‘Error in PrtObjAut. See joblog.’ ) +
MsgType( *Escape )
MonMsg ( CPF0000 MCH0000 ) Exec( +
Return )
EndDo

ChgVar &ErrorFlag ( ‘1’ )

RcvMsg MsgType( *Excp ) +
MsgDta( &MsgDta ) +
MsgID( &MsgID ) +
MsgF( &MsgF ) +
MsgFLib( &MsgFLib )

MonMsg ( CPF0000 MCH0000 )

SndPgmMsg MsgID( &MsgID ) +
MsgF( &MsgFLib/&MsgF ) +
MsgDta( &MsgDta ) +
MsgType( *Escape )
MonMsg ( CPF0000 MCH0000 )

/* =============================================================== */
/* = Clean up and exit program = */
/* =============================================================== */
Exit:

DltF QTemp/ObjList
MonMsg ( CPF0000 MCH0000 )

/* =============================================================== */
/* = End of program = */
/* =============================================================== */
EndPgm

Téléchargez cette ressource

Rapport mondial 2025 sur la réponse à incident

Rapport mondial 2025 sur la réponse à incident

Dans ce nouveau rapport, les experts de Palo Alto Networks, Unit 42 livrent la synthèse des attaques ayant le plus impacté l'activité des entreprises au niveau mondial. Quel est visage actuel de la réponse aux incidents ? Quelles sont les tendances majeures qui redessinent le champ des menaces ? Quels sont les défis auxquels doivent faire face les entreprises ? Découvrez les top priorités des équipes de sécurité en 2025.

Tech - Par Renaud ROSSET - Publié le 24 juin 2010

A lire aussi sur le site

Revue Smart DSI

La Revue du Décideur IT