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



Arco,

I just read my previous posting and realize that is not completely accurate
or clear without reading the original post.
There IS a file statement in the service program, but ONLY in the service
program.

I don't know exactly what you are doing different, but here is an example
that works for me in V5R2.
(I had played with this stuff for a long time before discovering that the
RPG manual had some inaccuracies regarding when one could/had to use
'likerec', 'likeds', and 'extname')
*********************************************
In /Copy prototype member
====================
(Ivmatl is the physical file name)
D IvRecd        E Ds           ExtName(IvMatl)
D                                     Qualified
D                                     Inz
(prototype for service program IvRtrv)
D IvRtrv          Pr                  LikeDs(IvRtrvOP)
D  InDs                               LikeDs(IvRtrvIP)
(input parameter for service program IvRtrv)
D IvRtrvIP        Ds                Qualified
D  IvRecd                            LikeDs(IvRecd)
D  Subr                       14A  Dim(5)
D  File                        10A
D  Library                    10A
D  Member                  10A
(return parameter for service program IvRtrv)
D IvRtrvOP        Ds               Qualified
D  IvRecd                             LikeDs(IvRecd)
D  RetCod                    8A                 
*********************************************
In service program
=============
(IvXO01 is a logical file built over IvMatl, identical to IvMatl, other than
being keyed.)
(The DDS format name for this file is IvO01, NOT IvRecd)
(There is NO declaratory reference to IvRecd other than from /Copy prototype
member)

FIvXO01    UF A E           K Disk    UsrOpn

*********************************************
In program that calls service program
===========================
(No declaratory reference to IvRecd, any IvMatl files, or IvMatl record
formats other than what was in /Copy prototypes)

In D specs, used to declare another field:
D  Source                             Like(IvRecd.IvSour)

In calcs, used to reset a format (numeric fields get filled with zeroes)
IvRtrvIP.IvRecd = IvRecd;

HTH

Tim Kredlo    





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.