|
This should be a quick one for most of you. What exactly is a service program, or rather, how are they implemented? Is a service program like a compiled, standalone subroutine or module of multiple subroutines? I've read the comments people have made in reference to them but haven't had a need for them so far. I'm still getting my feet wet with procedures and procedure interfaces. (I've used them for CALLP's and for replacing *ENTRY PLIST). This may or may not be applicable but I am familiar with creating RPG modules and then binding them into a executable program. Specifically, I've been adapting some of Scott Klement's code for reading and writing to the IFS in preparation for a project that's coming up. It's been going good so far but one of the examples creates a service program and uses it in later programs. I want to try to use it in my program but I'm not sure if I understand the implementation. The service program was successfully created in QGPL. I'm using a /COPY member of Scott's to define the procedure. I get the following error when I try to do a CRTBNDRPG on my program. Do I need to create my program as a module and then bind it to the service program? MY ERROR MESSAGE: Message . . . . : Definition not found for symbol 'READLINE'. Cause . . . . . : No definition was found for reference READLINE in *MODULE object NISCOTST1 in library QTEMP. The definition either does not exist or is not of the same data or procedure type as the reference. Recovery . . . : Try the Create Program (CRTPGM) command again, supplying an object that contains a definition for symbol READLINE. The service program was created in QGPL which is in my library list. SERVICE PROGRAM CODE SNIPPET: P readline B export D readline PI 10I 0 D fd 10I 0 value D text * value D maxlen 10I 0 value /COPY SNIPPET: D readline PR 10I 0 D fd 10I 0 value D text * value D maxlen 10I 0 value MY CODE SNIPPET: C dow readline(fd: %addr(line): %size(line))>=0 Any help or advice would be appreciated. Dave Parnin Nishikawa Standard Company Topeka, IN 46571 daparnin@xxxxxxxxxxxxxxxxxx
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.