-
Programm
Hallo Claus,
vielleicht hilft Dir dies weiter:
Hello,
The solution for your problem is a Validity
Checking Program for the WRKSPLF command :
Step 1.
Compile the following CL program :
/* */
/* \\\\\\\ */
/* ( o o ) */
/*------------------------oOO----(_)----OOo-------------------*/
/* */
/* Program : VALWRKSPLF */
/* System : iSeries */
/* Author : Herman Van der Staey */
/* */
/* Take control over the WRKSPLF command. */
/* */
/* Validity Checking program for command WRKSPLF */
/* */
/* */
/* ooooO Ooooo */
/* ( ) ( ) */
/*----------------------( )-------------( )---------------*/
/* (_) (_) */
/* */
/* The user is not authorised to use parameter USER *ALL */
/* (Except QSYSOPR, QSECOFR, QSRV) */
/* */
VALWRKSPLF: PGM PARM(&P1 &P2 &P3 &P4)
DCL VAR(&P1) TYPE(*CHAR) LEN(44)
DCL VAR(&P2) TYPE(*CHAR) LEN(7)
DCL VAR(&P3) TYPE(*CHAR) LEN(10)
DCL VAR(&P4) TYPE(*CHAR) LEN(1)
DCL VAR(&USER) TYPE(*CHAR) LEN(10)
DCL VAR(&USERPARM) TYPE(*CHAR) LEN(10)
DCL VAR(&FORMTYPE) TYPE(*CHAR) LEN(10)
DCL VAR(&DEVICE) TYPE(*CHAR) LEN(10)
DCL VAR(&USERDATA) TYPE(*CHAR) LEN(10)
DCL VAR(&ASP_BIN) TYPE(*CHAR) LEN(2)
DCL VAR(&ASP_DEC) TYPE(*DEC) LEN(2 0)
RTVJOBA USER(&USER)
/* Return if the USER is authorized to use all parameter values */
IF COND(&USER *EQ QSYSOPR *OR &USER *EQ QSECOFR +
*OR &USER *EQ QSRV) THEN(RETURN)
/* Parse the command parameters */
CHGVAR VAR(&ASP_BIN) VALUE(%SST(&P1 43 2))
CHGVAR VAR(&ASP_DEC) VALUE(%BIN(&ASP_BIN 1 2))
CHGVAR VAR(&USERPARM) VALUE(%SST(&P1 3 10))
CHGVAR VAR(&FORMTYPE) VALUE(%SST(&P1 13 10))
CHGVAR VAR(&DEVICE) VALUE(%SST(&P1 23 10))
CHGVAR VAR(&USERDATA) VALUE(%SST(&P1 33 10))
/* Check the value of the parameter USER */
IF COND(&USERPARM *NE *ALL) THEN(RETURN)
/* User is not allowed to execute WRKSPLF with USER *ALL */
/* Send a diagnostic message to the user. */
NOT_OK: SNDPGMMSG MSGID(CPD0006) MSGF(QCPFMSG) MSGDTA('0000 +
You are not Authorized to use parameter +
USER *ALL.') MSGTYPE(*DIAG)
/* Message CPF0002 is used in validity checking programs to */
/* indicate an error condition */
SNDPGMMSG MSGID(CPF0002) MSGF(QSYS/QCPFMSG) +
MSGTYPE(*ESCAPE)
END: ENDPGM
Step 2.
Execute the following command :
CHGCMD CMD(QSYS/WRKSPLF) VLDCKR(MYLIB/VALWRKSPLF)
To reset (If you made a mistake) :
CHGCMD CMD(QSYS/WRKSPLF) VLDCKR(*NONE)
quote :
A conclusion is simply the place where you got tired of thinking.
Regards,
Similar Threads
-
By Cobolaner in forum IBM i Hauptforum
Antworten: 17
Letzter Beitrag: 01-10-06, 18:39
-
By schwenth in forum IBM i Hauptforum
Antworten: 13
Letzter Beitrag: 18-09-06, 13:46
-
By cbe in forum NEWSboard Drucker
Antworten: 6
Letzter Beitrag: 29-06-06, 15:32
-
By Wolferl in forum IBM i Hauptforum
Antworten: 8
Letzter Beitrag: 06-06-06, 09:18
-
By FrEEk in forum IBM i Hauptforum
Antworten: 13
Letzter Beitrag: 22-09-04, 15:18
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- You may not post attachments
- You may not edit your posts
-
Foren-Regeln
|
Erweiterte Foren Suche
Google Foren Suche
Forum & Artikel Update eMail
AS/400 / IBM i
Server Expert Gruppen
Unternehmens IT
|
Kategorien online Artikel
- Big Data, Analytics, BI, MIS
- Cloud, Social Media, Devices
- DMS, Archivierung, Druck
- ERP + Add-ons, Business Software
- Hochverfügbarkeit
- Human Resources, Personal
- IBM Announcements
- IT-Karikaturen
- Leitartikel
- Load`n`go
- Messen, Veranstaltungen
- NEWSolutions Dossiers
- Programmierung
- Security
- Software Development + Change Mgmt.
- Solutions & Provider
- Speicher – Storage
- Strategische Berichte
- Systemmanagement
- Tools, Hot-Tips
Auf dem Laufenden bleiben
|
Bookmarks