Return to the CL Tips
Loading PTF Cover Letters from CD-ROM
Walden H. Leverich recently ordered two PTFs from IBM and received a CD-ROM with 60 PTFs. Not wanting to manually load cover pages for 60
PTFs, he wrote a quick and dirty CL program to load all the PTF cover letters on the CD-ROM. His public-domain program appears below.
PGM PARM(&pPrd &pDev) dcl &pPrd *char 7 /* Product 5769SS1, 5769ST1, etc. */ dcl &pDev *char 10 /* Device OPT01, OPT02, etc. */ dcl &wPath *dec 4 dcl &wPathC *char 4 /* Load PTF Cover Sheets */ loop: chgvar &wPath (&wPath + 1) LODPTF LICPGM(&pPrd) DEV(&pDev) PATHID(&wPath) COVER(*ONLY) monmsg cpf355c exec(goto endloop) /* Bail on 'Path Not Found' error */ goto loop endloop: rcvmsg /*Trash cpf355c from stack */ /* Send completion message */ chgvar &wPath (&wPath - 1) chgvar &wPathC (&wPath) sndpgmmsg msg(&wPathC *CAT ' PTF Cover Sheets loaded.') MSGTYPE(*COMP) endpgm
[report a broken link by clicking here]