|
Dear all, I completed as following and share with you: ************************************************************************ **************** * CHGSPLFA VCP for iSeries V5R2 * * Validity Checking program for command DSPSPLF * * Example : protecting an SPOOL From a USER * * CHGCMD CMD(CHGSPLFA) VLDCKR(MYLIB/CHGSPLFAVR) * To reset (in case you made errors) : * CHGCMD CMD(CHGSPLFA) VLDCKR(*NONE) ************************************************************************ **************** ************************************************************************ **************** * D E F I N I T I O N S P E C I F I C A T I O N * **************************************************************** * * Program Status Data Structure * D PGMDS SDS D Pgmq## *PROC D ErrorSts *STATUS D PrvStatus 16 20S 0 D SrcLinNum 21 28 D Routine *ROUTINE D NumParms *PARMS D ExcpType 40 42 D ExcpNum 43 46 * D PgmLib 81 90 D ExcpData 91 170 D ExcpId 171 174 D LastFile 201 208 D FileErr 209 243 D JobName 244 253 D User 254 263 D JobNumA 264 269 D JobNum 264 269S 0 D JobDate 270 275S 0 D RunDate 276 281S 0 D RunTime 282 287S 0 D PgmCrtDt 288 293 D PgmCrtTm 294 299 D CmplrLvl 300 303 D SrcFile 304 313 D SrcLib 314 323 D SrcMbr 324 333 D ProcPgm 334 343 D ProcMod 344 353 D cmd_str S 1024 INZ D cmd_len S 15P 5 INZ(1024) D msg_str S 256 D vApiErrDs ds D vbytpv 10i 0 inz(%size(vApiErrDs)) bytes provided D vbytav 10i 0 inz(0) bytes returned D vmsgid 7a error msgid D vresvd 1a reserved D vrpldta 50a replacement data D qmhsndpm PR ExtPgm('QMHSNDPM') SEND MESSAGES D 7 const ID D 20 const FILE D 73 const TEXT D 10i 0 const LENGTH D 10 const TYPE D 10 const QUEUE D 10i 0 const STACK ENTRY D 4 const KEY Db like(vApiErrDS) * QCMDEXC - Prototyped Call D qcmdexc PR EXTPGM('QCMDEXC') D cmd_str 1024 OPTIONS(*VARSIZE) CONST D cmd_len 15P 5 CONST C *entry Plist C Parm P1 1 C Parm P2 10 File C Parm P3 26 Job C Parm P4 4 Splnbr C Parm P5 8 Sysname C Parm P6 1 C Parm P7 1 C Parm P8 10 Device C Parm P9 1 C Parm P10 1 C Parm P11 1 C Parm P12 1 C Parm P13 1 C Parm P14 1 C Parm P15 1 C Parm P16 1 C Parm P17 20 Outq C Parm P18 1 C Parm P19 1 C Parm P21 1 C Parm P22 1 C Parm P23 1 C Parm P24 1 C Parm P25 1 C Parm P26 1 C Parm P27 1 C Parm P28 1 C Parm P29 1 C Parm P30 1 C Parm P31 1 C Parm P32 1 C Parm P33 1 C Parm P34 1 C Parm P35 1 C Parm P36 1 C Parm P37 1 C Parm P38 1 C Parm P39 1 C Parm P40 1 C Parm P41 1 C Parm P42 1 C * Exclude highest authority user C If User <> 'QSECOFR' and C User <> 'QSYSOPR' and C User <> 'CHANCY' * Limit user can chgsplfa on their own spooled C If %Subst(P3:11:10)<> User C Eval msg_str = C '0000 You are not authorized to ' + C 'spooled file ' + P2 * Send diag message C callp QMHSNDPM( C 'CPD0006':'QCPFMSG *LIBL ': C msg_str: C 256:'*DIAG ':'*CTLBDY ': 1:' ': C vApiErrDS) C * Send Excape message C callp QMHSNDPM( C 'CPF0002':'QCPFMSG *LIBL ': C ' ' : C 0 :'*ESCAPE':'*CTLBDY ': 1:' ': C vApiErrDS) C EndIf C EndIf C C Eval *InLr = *On -----Original Message----- From: midrange-l-admin@midrange.com [mailto:midrange-l-admin@midrange.com] On Behalf Of Vengoal Chang Sent: Tuesday, December 31, 2002 1:57 PM To: midrange-l@midrange.com Subject: RE: CL Program only accept 40 parameters in PARMs Tom, Thanks your help, I will use the RPGIV as VCP directly. Best regards, Vengoal -----Original Message----- From: midrange-l-admin@midrange.com [mailto:midrange-l-admin@midrange.com] On Behalf Of Tom Liotta Sent: Tuesday, December 31, 2002 10:28 AM To: midrange-l@midrange.com Subject: RE: CL Program only accept 40 parameters in PARMs Vengoal: Yes, the PGM command will only allow as many as 40 parms; this is documented and can be seen in the PGM help text. If you must go beyond 40 and you still need/want to use CL, then create an ILE RPG wrapper procedure to receive the parms from the CHGSPLFA command. The wrapper can place related parms into data structures and pass them to an ILE CL procedure for processing. Two modules bound into the program -- it shouldn't be much more complex as far as processing goes. Tom Liotta midrange-l-request@midrange.com wrote: > 9. RE: CL Program only accept 40 parameters in PARMs under SEU, but > CHGSPLFA Validity Checking Program need 42 (Vengoal Chang) > >The CLP under SEU cannot accept over than 40 parameters, and also >couldn't compiled. Maybe I can use RPGIV to do this ? > >-----Original Message----- >From: midrange-l-admin@midrange.com >[mailto:midrange-l-admin@midrange.com] On Behalf Of Booth Martin > >Is it SEU that forbids it, or is it a limitation in the CL Prompting? >Can you just type the last 2 parms into the CL line? -- -- Tom Liotta The PowerTech Group, Inc. 19426 68th Avenue South Kent, WA 98032 Phone 253-872-7788 x313 Fax 253-872-7904 http://www.powertechgroup.com __________________________________________________________________ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
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.