TechTalk: A onetime startup program can save you work during an IPL.

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Some system maintenance can be done only when the machine has no users. Examples are changes to subsystem descriptions, deleting or moving files that are normally open, and applying PTFs to Licensed Program Products (LPP). If you IPL the system during off-hours, you normally have to change your startup program to do these things for you each time they need to be done, or do them manually.

If you add the following lines to your system startup program before it starts any subsystems, you can create programs on the fly to take care of these tasks:

 CALL PGM(IPLPGMCL) MONMSG MSGID(CPF0000) DLTPGM PGM(IPLPGMCL) MONMSG MSGID(CPF0000) 

An example of a program to call is shown in 5. Just add what needs to be done and compile the program. The next time the system is IPL'd, your program object will be called, your tasks will be done, and the program object will be deleted. Deleting the program will keep it from being called twice.

An example of a program to call is shown in Figure 5. Just add what needs to be done and compile the program. The next time the system is IPL'd, your program object will be called, your tasks will be done, and the program object will be deleted. Deleting the program will keep it from being called twice.

You should take some safety measures when using this technique. First, because the system will need user intervention to answer error messages if your program fails, you should include a global Monitor Message (MONMSG) command in IPLPGMCL. To see if everything was successful, force the creation of a job log. You can even have the program send the job log to your central AS/400 if you have more than one system.

If your startup program adopts authority, this technique will create a security exposure. To eliminate it, create a library that can only be accessed by the profile that owns the startup program. Place the onetime program in this library. You can then hardcode the CALL in the startup program, preventing anyone from creating a onetime program in another library in the library list that will inherit the caller's authority.

- Martin Pluth


TechTalk: A onetime startup program can save you work during an IPL.

Figure 5: Example Onetime Startup Program IPLPGMCL

 PGM MONMSG MSGID(CPF0000) /* Insert onetime code here */ DSPJOBLOG OUTPUT(*PRINT) HLDSPLF FILE(QPJOBLOG) SPLNBR(*LAST) /* If you have more than one AS/400, send the joblog */ SNDNETSPLF FILE(QPJOBLOG) TOUSRID((PLUTH MCEDIT)) + SPLNBR(*LAST) DLTSPLF FILE(QPJOBLOG) SPLNBR(*LAST) ENDPGM 
BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: