|
Err... sorry Bill... I just looked at it again, and realized that you're missing the word "VARYING" in the i_String parameter. Please add that keyword to the D-spec for both the prototype & PI.
--- Scott Klement http://www.scottklement.com On Fri, 27 Jan 2006, Scott Klement wrote:
On Fri, 27 Jan 2006, Reger, Bill wrote:I have been doing way too much managing and not enough coding so I am a bit rusty. I can't seem to figure out what the prototype and PI specs should be for a command "Prompt Override Program" (POP) written in RPG ILE. POP parameters are not documented well anywhere.What sort of problem are you having with the parameters?D PR EXTPGM('CMDPOPPGM') D i_Cmd 20A D i_Obj 20A D i_ObjType 10A D i_LenStr 10I 0 D i_String 1024A options(*varsize: *nopass)The first parm should be 20A. Chars 1-10 are the command name, and chars 11-20 are the library. The 2nd, 3rd, 4th parms are the key parms from your program. The last one is the command string which should be 32767. Assuming that i_Obj, i_ObjType and i_LenStr match your key parms (they look like they might) then your prototype should work fine with the following notes: a) You need to give the prototype and it's corresponding PI a name. You can't leave the name blank. Maybe set it to "CMDPOPPGM". b) You've only defined 1k for the command string, but this should only matter if you can't fit your output info into that 1k. You don't need *varsize or *nopass, though they won't hurt anything. c) I'd consider marking the i_cmd, i_Obj, i_ObjType and i_LenStr parms with "CONST" since your program isn't supposed to change them, and this'll provide a little extra validity checking in the code. d) The PI should be identifical to the prototype (aside from the letters PI instead of PR, and the PI does not get an "EXTPGM") The documentation for Prompt Override Programs is in Chapter 9 of the CL Programming manual. What sort of errors are you having?
As an Amazon Associate we earn from qualifying purchases.
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.