Make CHGNETA more user-friendly

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(&DDMACC)     TYPE(*CHAR) LEN(10)
             DCL        VAR(&DDMACCLIB)  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(&DDMACC) +
                          DDMACCLIB(&DDMACCLIB) 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) |< ')')
                          9 8) |< ')')
             CHGVAR     VAR(&RETCMD) VALUE(&RETCMD |> '? '? '? '? '? '? '? '? '? +
                          '? '? 


This was first published in January 2002

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.