× 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.




Two things:
Binder language.
Binder directory.

Independent of each other.

Binder language is useful when you compile a service program.  If you add
another subprocedure then you won't have to recompile everything.  Sort of
like avoiding Record Format Level Checks, but different.  See also
'signature'.  Only three commands.  Stuff is so easy I took 2 courses on it
at COMMON because I couldn't believe how easy it really was.  I think by
the end Jon and Susan were prepped to slap me.

Binder directory.
Do the following:
CRTBNDDIR BNDDIR(DAVEP/MYBNDDIR)  some people have been known to name it
after their service program.  Ok naming if only contains one service
program, I guess.
ADDBNDDIRE BNDDIR(DAVEP/MYBNDDIR) OBJ((DAVEP/MYSRVPGM *SRVPGM)) replace
MYSRVPGM with the name of Scott's service program.
In the program that uses this service program add the following H spec
     H Bnddir('DAVEP/MYBNDDIR')
Beats heck out of CRTRPGMOD, CRTPGM BNDSRVPGM(MYLIB/MYSRVPGM)

See also the redbook "Who knew you could do that with RPG..."


Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com


|-----------------------------+-------------------------------------------|
|   daparnin@xxxxxxxxxxxxxxxxx|                                           |
|   m                         |                                           |
|   Sent by:                  |                                         To|
|   rpg400-l-bounces@midrange.|      rpg400-l@xxxxxxxxxxxx                |
|   com                       |                                         cc|
|                             |                                           |
|   07/22/2004 01:51 PM       |                                    Subject|
|                             |      Service Programs 101                 |
|         Please respond to   |                                           |
|      RPG programming on the |                                           |
|          AS400 / iSeries    |                                           |
|      <rpg400-l@xxxxxxxxxxxx>|                                           |
|                             |                                           |
|                             |                                           |
|-----------------------------+-------------------------------------------|










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

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.