Re: print ILE built-in functions, V5R3-specific - CORRECTION
Dave McKenzie <[email protected]>
| Newsgroups | gmane.comp.lang.as400.mi |
|---|---|
| Message-ID | <[email protected]> |
Also, 5001 in the last line should be 4001 for V5R2. The first time I did it, I restored the V5R2 QWXCRTMD on a V5R3 system (NOT to QSYS!) and ran the Rexx pgm against it. Of course that would create a V5R3 save file. D'oh! The pgm starts at position x4001 in a V5R2 save file. --Dave Dave McKenzie wrote: > Looks like for V5R2 the 22A0 was 2190, and the 3980 was 37B0. > > --Dave > > Christen, Duane J. wrote: >> Gene; >> >> I hate to ask, but would you know the values for V5R2? >> >> Duane Christen >> >> -----Original Message----- >> From: Gene_Gaunt-GDFlLPZ4eRKEK/[email protected] [mailto:Gene_Gaunt-GDFlLPZ4eRKEK/[email protected]] >> Sent: Tuesday, June 14, 2005 11:20 AM >> To: mi400-Zwy7GipZuJhWk0Htik3J/[email protected] >> Subject: [MI400] print ILE built-in functions, V5R3-specific >> >> >> As you know, my old print program for MI built-in functions no longer >> works, since IBM removed the user space that contained the function >> names. >> But, for V5R3 at least, here is my rewrite that *will* work. Note that >> beyond V5R3, the three specific values below (665, 22A0, and 3980) will >> probably need changing. >> >> >> /********************************************************************/ >> /* PROGRAM - PRTBUILTIN */ >> /* FUNCTION - print the ILE built-in functions, V5R3-specific */ >> /* LANGUAGE - REXX */ >> /* AUTHOR - Gene Gaunt */ >> /********************************************************************/ >> >> "crtsavf file(qtemp/stdin)" >> "savobj obj(qwxcrtmd) ", >> "lib(qsys) ", >> "objtype(*pgm) ", >> "dev(*savf) ", >> "savf(qtemp/stdin) ", >> "updhst(*no) ", >> "dtacpr(*no)" >> "ovrdbf file(stdin) ", >> "tofile(qtemp/stdin)" >> "ovrprtf file(stdout) ", >> "tofile(qsysprt) ", >> "splfname(prtbuiltin)" >> data = '' >> do forever >> parse linein record >> if record == '' then leave >> data = data || left( record, 512 ) >> end >> walk = c2d( substr( data, X( 75 ), 3 )) >> walk = c2d( substr( data, X( 1D ) + walk, 3 )) >> walk = c2d( substr( data, X( 75 ) + walk, 3 )) >> walk = c2d( substr( data, X( 45 ) + walk, 3 )) >> walk = c2d( substr( data, X( 665 ) + walk, 3 )) + X( 0 ) >> name = walk + x2d( 22A0 ) >> code = walk + x2d( 3980 ) >> do while walk < name >> AA = c2d( substr( data, walk, 4 )) >> BB = c2d( substr( data, walk + 4, 2 )) >> CC = c2d( substr( data, walk + 6, 2 )) >> DD = c2d( substr( data, walk + 8, 2 )) >> EE = c2d( substr( data, walk + 10, 2 )) >> if BB == 0 then leave >> show = left( substr( data, name + AA, BB ), 20 ) >> do DD while EE == 0 >> show = show ||, >> right( c2d( substr( data, code + CC * 4, 4 )), 6 ) >> CC = CC + 1 >> end >> say show >> walk = walk + 12 >> end >> return >> X: return x2d( 5001 ) + x2d( arg( 1 )) >> >> _______________________________________________ This is the MI Programming on the AS400 / iSeries (MI400) mailing list To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/mi400 or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/mi400.