Problem solve Get help with specific problems with your technologies, process and projects.

Make CHGNETA more user-friendly

The CHGNETA command doesn't show current values. Check out this tip to learn a workaround.

The CHGNETA command doesn't show current values, forcing you to either print or memorize the DSPNETA output.

Compile this program to QUSRSYS and then use CHGCMD CMD(QSYS/CHGNETA) PMTOVRPGM(QUSRSYS/CHGNETAPOP). From now on, CHGNETA will show current values also.

             PGM        PARM(&CMDNAME &RETCMD)
             DCL        VAR(&CMDNAME)    TYPE(*CHAR) LEN(20)
             DCL        VAR(&RETCMD)     TYPE(*CHAR) LEN(5700)

             DCL        VAR(&RETLEN)     TYPE(*DEC)  LEN(5 0)
             DCL        VAR(&CRETLEN)    TYPE(*CHAR) LEN(2)
             DCL        VAR(&INUM)       TYPE(*DEC)  LEN(2)
             DCL        VAR(&ISTART)     TYPE(*DEC)  LEN(2)

             DCL        VAR(&SYSNAME)    TYPE(*CHAR) LEN(8)
             DCL        VAR(&LCLNETID)   TYPE(*CHAR) LEN(8)
             DCL        VAR(&LCLCPNAME)  TYPE(*CHAR) LEN(8)
             DCL        VAR(&LCLLOCNAME) TYPE(*CHAR) LEN(8)
             DCL        VAR(&DFTMODE)    TYPE(*CHAR) LEN(8)
             DCL        VAR(&NODETYPE)   TYPE(*CHAR) LEN(8)
             DCL        VAR(&DTACPR)     TYPE(*DEC)  LEN(10 0)
             DCL        VAR(&CDTACPR)    TYPE(*CHAR) LEN(10)
             DCL        VAR(&DTACPRINM)  TYPE(*DEC)  LEN(10 0)
             DCL        VAR(&CDTACPRINM) TYPE(*CHAR) LEN(10)
             DCL        VAR(&MAXINTSSN)  TYPE(*DEC)  LEN(5 0)
             DCL        VAR(&CMAXINTSSN) TYPE(*CHAR) LEN(5)
             DCL        VAR(&RAR)        TYPE(*DEC)  LEN(5 0)
             DCL        VAR(&CRAR)       TYPE(*CHAR) LEN(5)
             DCL        VAR(&NETSERVER)  TYPE(*CHAR) LEN(85)
             DCL        VAR(&ALRSTS)     TYPE(*CHAR) LEN(10)
             DCL        VAR(&ALRPRIFP)   TYPE(*CHAR) LEN(10)
             DCL        VAR(&ALRDFTFP)   TYPE(*CHAR) LEN(10)
             DCL        VAR(&ALRLOGSTS)  TYPE(*CHAR) LEN(7)
             DCL        VAR(&ALRBCKFP)   TYPE(*CHAR) LEN(16)
             DCL        VAR(&ALRRQSFP)   TYPE(*CHAR) LEN(16)
             DCL        VAR(&ALRCTLD)    TYPE(*CHAR) LEN(10)
             DCL        VAR(&ALRHLDCNT)  TYPE(*DEC)  LEN(5 0)
             DCL        VAR(&CALRHLDCNT) TYPE(*CHAR) LEN(5)
             DCL        VAR(&ALRFTR)     TYPE(*CHAR) LEN(10)
             DCL        VAR(&ALRFTRLIB)  TYPE(*CHAR) LEN(10)
             DCL        VAR(&MSGQ)       TYPE(*CHAR) LEN(10)
             DCL        VAR(&MSGQLIB)    TYPE(*CHAR) LEN(10)
             DCL        VAR(&OUTQ)       TYPE(*CHAR) LEN(10)
             DCL        VAR(&OUTQLIB)    TYPE(*CHAR) LEN(10)
             DCL        VAR(&JOBACN)     TYPE(*CHAR) LEN(10)
             DCL        VAR(&MAXHOP)     TYPE(*DEC)  LEN(5 0)
             DCL        VAR(&CMAXHOP)    TYPE(*CHAR) LEN(5)
             DCL        VAR(ⅅMACC)     TYPE(*CHAR) LEN(10)
             DCL        VAR(ⅅMACCLIB)  TYPE(*CHAR) LEN(10)
             DCL        VAR(&PCSACC)     TYPE(*CHAR) LEN(10)
             DCL        VAR(&PCSACCLIB)  TYPE(*CHAR) LEN(10)
             DCL        VAR(&DFTNETTYPE) TYPE(*CHAR) LEN(10)
             DCL        VAR(&DFTCNNLST)  TYPE(*CHAR) LEN(10)

/* Retrieve current parameters */

                          LCLCPNAME(&LCLCPNAME) +
                          LCLLOCNAME(&LCLLOCNAME) DFTMODE(&DFTMODE) +
                          NODETYPE(&NODETYPE) DTACPR(&DTACPR) +
                          DTACPRINM(&DTACPRINM) +
                          MAXINTSSN(&MAXINTSSN) RAR(&RAR) +
                          NETSERVER(&NETSERVER) ALRSTS(&ALRSTS) +
                          ALRPRIFP(&ALRPRIFP) ALRDFTFP(&ALRDFTFP) +
                          ALRLOGSTS(&ALRLOGSTS) ALRBCKFP(&ALRBCKFP) +
                          ALRRQSFP(&ALRRQSFP) ALRCTLD(&ALRCTLD) +
                          ALRHLDCNT(&ALRHLDCNT) ALRFTR(&ALRFTR) +
                          ALRFTRLIB(&ALRFTRLIB) MSGQ(&MSGQ) +
                          MSGQLIB(&MSGQLIB) OUTQ(&OUTQ) +
                          OUTQLIB(&OUTQLIB) JOBACN(&JOBACN) +
                          MAXHOP(&MAXHOP) DDMACC(ⅅMACC) +
                          DDMACCLIB(ⅅMACCLIB) PCSACC(&PCSACC) +
                          PCSACCLIB(&PCSACCLIB) +

/* Convert the numeric variables to string to allow concatenation */
/* Also substitute the special values. */
             CHGVAR     VAR(&CDTACPR)    VALUE(&DTACPR)
             IF         COND(&DTACPR *EQ 0) THEN(CHGVAR +
                          VAR(&CDTACPR) VALUE(*NONE))
             IF         COND(&DTACPR *EQ -1) THEN(CHGVAR +
                          VAR(&CDTACPR) VALUE(*REQUEST))
             IF         COND(&DTACPR *EQ -2) THEN(CHGVAR +
                          VAR(&CDTACPR) VALUE(*ALLOW))
             IF         COND(&DTACPR *EQ -3) THEN(CHGVAR +
                          VAR(&CDTACPR) VALUE(*REQUIRE))
             IF         COND(&DTACPRINM *EQ 0) THEN(CHGVAR +
                          VAR(&CDTACPRINM) VALUE(*NONE))
             IF         COND(&DTACPRINM *EQ -1) THEN(CHGVAR +
                          VAR(&CDTACPRINM) VALUE(*REQUEST))
             CHGVAR     VAR(&CRAR)       VALUE(&RAR)
             CHGVAR     VAR(&CMAXHOP)    VALUE(&MAXHOP)

             CHGVAR     VAR(&RETCMD) VALUE('?
                          %SST(&NETSERVER &ISTART 8) |< ')')
             CHGVAR     VAR(&INUM) VALUE(&INUM + 1)
             IF         COND(&INUM *LT 6) THEN(GOTO CMDLBL(NET1))
             CHGVAR     VAR(&RETCMD) VALUE(&RETCMD |< ')')

             CHGVAR     VAR(&RETCMD) VALUE(&RETCMD |> '?
                  %SST(&ALRBCKFP +
                          9 8) |< ')')
             CHGVAR     VAR(&RETCMD) VALUE(&RETCMD |> '?
                   %SST(&ALRRQSFP +
                          9 8) |< ')')
             CHGVAR     VAR(&RETCMD) VALUE(&RETCMD |> '?


This was last published in January 2002

Dig Deeper on Implementation

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.