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



You need to use the CRTRPGMOD and CRTSRVPGM.

HTH

Hoss

-----Original Message-----
From: THarteau@xxxxxxxxxxxxxxxxxx [mailto:THarteau@xxxxxxxxxxxxxxxxxx] 
Sent: Thursday, August 25, 2005 1:36 PM
To: RPG programming on the AS400 / iSeries
Subject: Problems creating service program module


Hi,

      Quite some time ago, I created several modules and put them into a
service program.  I need to add another one, and I can't quite seem to get
it right.

I added the PR to a copy book:
      D ProdLine        PR             5
      D                                       5    Value

I created this procedure:
H  NOMAIN
 *  External procedure for PRODLINE
 /COPY QPROSRC,PROINV
 ////////////////////////////////////////////////////////////////////
 //  Procedure to return the product line for an product group.
PProdLine         B                   EXPORT
D ProdLine        PI             5
D  CXMPG                         5    VALUE
D*
D PrdLn           S              5    INZ('   ')
C*
C/EXEC SQL
C+ SELECT gpl INTO :PrdLn FROM kpg WHERE gcde = :cxmpg
C/END-EXEC
C*
C*
C                   Return    PrdLn
C*
PProdLine         E

I tried
CRTSQLRPGI OBJ(V64BpcsPGM/PRODLINE) SRCFILE(V64BPCSPGM/QPROSRC)
and got these errors:
*RNF7031 00     35 The name or indicator is not referenced.
*RNF1304 20      1 The NOMAIN keyword is not valid when the CRTBNDRPG
command is
                   used to create a program.
*RNF1514 30      1 A procedure cannot be exported when the external name is
the
                   same as the main procedure.
*RNF3788 30      3 Keyword EXTPGM must be specified when DFTACTGRP(*YES) is
                   specified on the CRTBNDRPG command.
*RNF7023 40      1 The Compiler cannot determine how the program can end.

OK, says I, so I tried
CRTSQLRPG PGM(V64BPCSPGM/PRODLINE) SRCFILE(V64BPCSPGM/QPROSRC)
and got an SQL pre-compiler failure
 SQL0312  30      41  Position 26 Variable PRDLN not defined or not usable.
 SQL0312  30      41  Position 55 Variable CXMPG not defined or not usable.

What am I doing wrong?  I did get something similar to work about a year
ago.  Help!

<===================================================>

Terri Harteau
Felker Brothers Corporation
****************
"The happiest people don't necessarily have the best of everything.
They just make the best of everything!"
****************





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.