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



On 12/10/2024 12:28 PM, James H. H. Lampert via RPG400-L wrote:
On 12/10/24 9:21 AM, tgarvey@xxxxxxxxxx wrote:

Any ideas why the first execution misbehaves but the second works fine?

Is there anything in the joblog?

Are there any overrides or library list changes in effect (or not in effect), that might be giving the RPG program an empty primary file?

I'm of the same mind as James; I think the input files are empty.

I'd add an INFDS and some DUMP opcodes to see what the program sees at runtime. In particular, the EOFInd, MsgID, and NUM_RCDS will be informative.


h* test matching record
h/copy qrpglesrc,stdhspec

fmrpri ipe e k disk infds(pri)
fmrsec ise e k disk infds(sec)


Dpri ds qualified
D File *FILE
D OpenInd 9 9
D EOFInd 10 10
D FileStatus *STATUS
D OpCode *OPCODE
D Routinr *ROUTINE
D RecordFmt *RECORD
D MsgID 46 52

D ODP_TYPE 81 82
D FILE_NAME 83 92
D LIBRARY 93 102
D RCD_LEN 125 126I 0
D KEY_LEN 127 128I 0
D MEMBER 129 138
D TYPE 147 148I 0
D NUM_RCDS 156 159I 0

Dsec ds qualified
D File *FILE
D OpenInd 9 9
D EOFInd 10 10
D FileStatus *STATUS
D OpCode *OPCODE
D Routinr *ROUTINE
D RecordFmt *RECORD
D MsgID 46 52

D ODP_TYPE 81 82
D FILE_NAME 83 92
D LIBRARY 93 102
D RCD_LEN 125 126I 0
D KEY_LEN 127 128I 0
D MEMBER 129 138
D TYPE 147 148I 0
D NUM_RCDS 156 159I 0

imrprirec 01
i key l1m1
imrsecrec 02
i key l1m1


c 'Running' dsply
c 'Detail' dump(a)
c 01'01' dump(a)
c 02'02' dump(a)

clr 'LR' dump(a)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 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.