Eliminate the hassle of recreating configuration objects

Creating configuration objects, especially lines, controllers and devices for communications, can be time-consuming. You'd hate to create objects only to have to recreate them from scratch should they get deleted. Fortunately, there's a command that makes it easier to recreate configuration objects should something happen to them: the Retrieve Configuration Source command. Dan Reusche explains in this iSeries administrator tip.

Creating configuration objects, especially lines, controllers and devices for communications, can be a time-consuming and frustrating job. You have to make sure you have all of the parameters specified correctly on the object or it may not work the way you intended -- or at all. That means once you finally have your configuration objects created and running correctly, you will want to ensure that you don't have to recreate them from...

scratch. One way to protect yourself is to save the objects as part of your save strategy, which is highly recommended. If you have to, you can always go back to the tape or save file and retrieve them. However, that method can also be time-consuming. Fortunately, IBM has given us another way to recreate the objects: the Retrieve Configuration Source (RTVCFGSRC) command.

The RTVCFGSRC command allows you to store the create commands for your configuration objects in a command language source member (or a set of members, depending on how your use the command). You can keep the source file on your system. Then if you need to quickly recreate the configuration objects, you can compile the source member and run the resulting program. A good example of when you might need to do that is when someone accidentally deletes the configuration object and you need to quickly recreate it to get things working again.

I like to use RTVCFGSRC when I am modifying an existing configuration object to make it work in a new environment or to tune it to work better in an existing environment. As a very simple example, suppose my network team is upgrading the company's Ethernet service from 10M to 100M. I want to take advantage of the faster speed, and the hardware I have will allow me to do so. I need to just reconfigure my existing Ethernet line description. In this case I need to change the LINESPEED and LINKSPEED parameters from 10M to 100M. But what if the change was more complicated? It would be a good idea to have the old configuration saved before starting to change parameters using the CHGLINETH command.

To save the configuration source, you can type RTVCFGSRC at a command line. When you hit enter you will see a display like the one in Figure 1:

_______________________________________________________________________
                    Retrieve Configuration Source (RTVCFGSRC)                  
                                                                               
 Type choices, press Enter.                                                    
                                                                               
 Configuration description  . . .                 Name, generic*, *ALL         
                + for more values                                              
 Type . . . . . . . . . . . . . .                 *ALL, *NWSD, *NWID, *LIND... 
 Source file  . . . . . . . . . .   QCLSRC        Name, QCLSRC                 
   Library  . . . . . . . . . . .     *LIBL       Name, *LIBL, *CURLIB         
 Source member  . . . . . . . . .   *CFGD         Name, *CFGD                  
                                                                        
                                                                               
                                                                               
                                                                               
                                                                         Bottom
 F3=Exit   F4=Prompt   F5=Refresh   F10=Additional parameters   F12=Cancel     
 F13=How to use this display        F24=More keys                              
_____________________________________________________________________________

Figure 1: The RTVCFGSRC command

You can enter the line description name and the type and specify the source file and member name, as shown in Figure 2. Note that in Figure 2 *CFGD was used for the source member parameter, which will create a source member in MYLIB/QCLSRC with a name of MYLINE (from the configuration description parameter).

You can specify either *NET or *OBJ for the retrieve option parameter. *OBJ will give you the source for just the object specified, but *NET will give you the source for that object and any objects below it in the configuration hierarchy. For a line description, *NET will retrieve the source for the lind and any ctld and devd objects that are attached to the line. I usually specify *NET and then if I find later that I need to create only one of the objects, I can copy the create command for the specific object into a different source file or modify the existing source file, commenting out or deleting what I don't need.

_____________________________________________________________________________
                    Retrieve Configuration Source (RTVCFGSRC)                  
                                                                               
 Type choices, press Enter.                                                    
                                                                               
 Configuration description  . . . > MYLINE        Name, generic*, *ALL         
                + for more values                                              
 Type . . . . . . . . . . . . . . > *LIND         *ALL, *NWSD, *NWID, *LIND... 
 Source file  . . . . . . . . . . > QCLSRC        Name, QCLSRC                 
   Library  . . . . . . . . . . . >   MYLIB       Name, *LIBL, *CURLIB         
 Source member  . . . . . . . . .   *CFGD         Name, *CFGD                  
 Retrieve option  . . . . . . . .   *NET          *NET, *OBJ                   
                                                                               
                                                                     
                                                                               
                                                                               
                                                                               
                                                                         Bottom
 F3=Exit   F4=Prompt   F5=Refresh   F10=Additional parameters   F12=Cancel     
 F13=How to use this display        F24=More keys 
_____________________________________________________________________________

Figure 2: Filling in the RTVCFGSRC command

If you view the source member that you just created, you will see something like what's shown in Figure 3.

 Columns . . . :    1  80                                       Edit               MYLIB/QCLSRC
 SEU==>                                                                               MYLINE
 FMT **  ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8                                           
*************** Beginning of data ********************************************************  
0000.01 /*                                     MYLINE    11/07/05 13:58:34 */                051107                                
0000.02 CRTLINETH LIND(MYLINE) RSRCNAME(CMN01) ONLINE(*YES) +                                051107                                
0000.03          VRYWAIT(*NOWAIT) MAXCTL(40) ADPTADR(*ADPT) +                                051107                                
0000.04          EXCHID(05600441) ETHSTD(*ALL) LINESPEED(10M) +                              051107                                
0000.05          DUPLEX(*FULL) MAXFRAME(1496) SSAP((04 1496 *SNA)(12 1496 +                  051107                                
0000.06          *NONSNA)(AA 1496 *NONSNA)(C8 1496 *HPR)) THRESHOLD(*OFF) +                  051107                                
0000.07          GENTSTFRM(*YES) LINKSPEED(10M) COSTCNN(0) COSTBYTE(0) +                     051107                                
0000.08          SECURITY(*NONSECURE) PRPDLY(*LAN) USRDFN1(128) +                            051107                                
0000.09          USRDFN2(128) USRDFN3(128) AUTOCRTCTL(*NO) CMNRCYLMT(2 5) +                  051107                                
0000.10          MSGQ(*SYSVAL) TEXT('ethernet line description for mysys')                   051107                                
0000.11 CRTCTLNET CTLD(MYCTL) ONLINE(*NO) LINE(MYLINE) CNNRSPTMR(170) +                      051107                                
0000.12          TEXT('CREATED BY AUTO-CONFIGURATION')                                       051107                                
0000.13 CRTDEVNET DEVD(MYDEV) TYPE(*TCPIP) ONLINE(*NO) CTL(MYCTL) +                          051107                                
0000.14          TEXT('CREATED BY AUTO-CONFIGURATION')                                       051107                                
        ****************** End of data ******************************************************************************************  

Figure 3: Source member created by RTVCFGSRC

After you verify that the source has been created, you can modify the existing line description for MYLINE as much as you want, knowing that if you get to a point where you need to get back to the original, you can simply delete the existing MYLINE, MYCTL, and MYDEV objects, compile source file MYLINE and run the resulting MYLINE program.

You may even want to create a job scheduler entry to retrieve your communication configuration source periodically so that you always have a recent copy of your communications setup. This can save a lot of time if something is deleted.

---------------------------
About the author: Dan Reusche is a senior systems administrator at Think Federal Credit Union in Rochester, Minn. He has worked with the IBM AS/400 and iSeries platform since 1988, when he worked at the IBM Rochester Development Lab and support of AS/400 systems used within IBM. You may contact him at dreusche@chartermi.net.


This was first published in November 2005

0 comments

Oldest 

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:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close