[NEWSboard IBMi Forum]
  1. #1
    Registriert seit
    Feb 2005
    Beiträge
    8

    Wrksplf ohne eingabemöglichkeit

    Hallo!
    Ich will ein kleines CL programm schreiben, das zum einen WRKSPLF als
    Kommando ausführen soll und zum anderen die Kommandoreihe deaktiviert.
    Gibt es ein Kommando, das die Eingabereihe deaktiviert?

    Gruss
    Claus

  2. #2
    Registriert seit
    May 2002
    Beiträge
    2.642

    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,

  3. #3
    Registriert seit
    Feb 2001
    Beiträge
    20.241
    Die Kommandozeile kann beim WRKSPLF nicht abgeschaltet werden.
    Ob diese sichtbar ist, hängt vom WRKSPLF ... ASTLVL(...) ab. Nur bei *BASIC gibts keine Kommandozeile, die der Benutzer sich dann allerdings mit F21 wiederholen kann.
    Ob und welche Befehle wiederum benutzbar sind hängt
    a) von der Berechtigung
    b) von LMTCPB im Userprofil ab.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

  4. #4
    Registriert seit
    Sep 2001
    Beiträge
    156
    Wie wärs denn mit dem Tool PLOAD (einfach mal im www suchen).
    Dann den Command PLOAD als Ersatz vom WRKSPLF-Befehl in System-Bibliothek vorschalten.
    Damit hast du volle Kontrolle über die Befehlszeile oder auch mögliche Auswahlen.
    Gruss
    Rolf

Similar Threads

  1. WRKSPLF Option: 4 (löschen)
    By Cobolaner in forum IBM i Hauptforum
    Antworten: 17
    Letzter Beitrag: 01-10-06, 18:39
  2. WRKSPLF und QUSER
    By schwenth in forum IBM i Hauptforum
    Antworten: 13
    Letzter Beitrag: 18-09-06, 13:46
  3. Antworten: 6
    Letzter Beitrag: 29-06-06, 15:32
  4. Performance WRKSPLF *ALL
    By Wolferl in forum IBM i Hauptforum
    Antworten: 8
    Letzter Beitrag: 06-06-06, 09:18
  5. Von AS/Menu über WRKSPLF zu Custom-Funktion
    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
  •