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

Rename directory entries

Here's an easier way to rename your existing iSeries system from SYSTEMA to SYSTEMB.

If you have (for any reason) to rename your existing iSeries system from SYSTEMA to SYSTEMB, one major task will probably be to rename all the existing local directory entries manually using option 7=Rename.

Another solution would be using the below command RNMALLDIRE:


  COMMAND source code :

CMD        PROMPT('Rename all Directory Entries')

             PARM       KWD(FROMSYSTEM) TYPE(*NAME) LEN(8) MIN(1) +
                          MAX(1) CHOICE('Name') PROMPT('Old system +
                          name')

             PARM       KWD(TOSYSTEM) TYPE(*NAME) LEN(8) MIN(1) +
                          MAX(1) CHOICE('Name') PROMPT('New system +
                          name')

PGM source code:

             PGM        PARM(&FROMSYSTEM &TOSYSTEM)
             DCL        VAR(&FROMSYSTEM) TYPE(*CHAR) LEN(8)
             DCL        VAR(&TOSYSTEM) TYPE(*CHAR) LEN(8)
             DCLF       FILE(QTEMP/DSPALLDIRE)
             DSPDIRE    OUTPUT(*OUTFILE) OUTFILE(QTEMP/DSPALLDIRE) +
                          DETAIL(*FULL)

 LOOP:       RCVF
             MONMSG     MSGID(CPF0864) EXEC(GOTO CMDLBL(END))

             IF         COND(&WOSDDEN *NE '*ANY    ' *AND &WOSDDGN +
                          *EQ &FROMSYSTEM) THEN(DO)
             RMVDIRE    USRID(&WOSDDEN &WOSDDGN)
             CHGVAR     VAR(&WOSDDGN) VALUE(&TOSYSTEM)
             CHGVAR     VAR(&WOSDREN) VALUE(&TOSYSTEM)
             ADDDIRE    USRID(&WOSDDEN &WOSDDGN) USRD(&WOSDDESC) +
                          USER(&WOSDUSRP) SYSNAME(&WOSDREN +
                          &WOSDRGN) TELNBR1(&WOSDTEL1) +
                          TELNBR2(&WOSDTEL2) FAXTELNBR(&WOSDFAX) +
                          LOC(&WOSDLOC) ADDR1(&WOSDADD1) +
                          ADDR2(&WOSDADD2) ADDR3(&WOSDADD3) +
                          ADDR4(&WOSDADD4)
             ENDDO

             GOTO       CMDLBL(LOOP)

 END:        ENDPGM 

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: Tips, tutorials and more.

Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.

Read this Search400 Featured Topic: Managing your iSeries.

Dig Deeper on Integrated File System (IFS)

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close