× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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 ))


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.