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



Just a guess. Your OVRDBF is scoped to one activation group while your
program runs in another?




On Mon, May 19, 2014 at 12:19 PM, Rob Dixon <robertsdixon@xxxxxxxxx> wrote:

I haven't needed to read a source file for about 24 years and didn't have
any problems reading them with OPM RPG.

Now I need to do it again and am using RPGLE. I can open the file and read
records but the fields are all empty. I must be doing something pretty
dumb. I am on V5R1. Can anyone help please? I have tried with both
externally described and program described files.

The code below is for the program described version

The file is defined in the program with

0001.10 FERPGLESRC IF F 112 DISK
0001.11 F USROPN

It is a full procedural file

The Input fields are

0248.39 IERPGLESRC DS
0248.40 I 1 6 2SRCSEQ
0248.41 I 7 12 SRCDAT
0248.42 I 13 112 SRCDTA

and the file statements are

0496.32 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * *
0496.33 C/SPACE
1
0496.34 C FNPEXT
BEGSR
0496.35 C/SPACE
1
0496.36 C Read ERPGLESRC
5152
0496.37 C/SPACE
1
0496.38 C
ENDSR
0496.39 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
0496.40 C/SPACE
1
0496.41 C FNP#1O
BEGSR
0496.42 C/SPACE
1
0496.43 * This subroutine opens the source
file
0496.44 C OPEN ERPGLESRC
51
0496.45 C MOVE 'Y'
OPNSRC
0497.08 C/SPACE
1
0497.09 C
ENDSR
0497.10 C/SPACE
1
0497.65 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*


I then do an override before calling the program

OVRDBF FILE(ERPGLESRC) TOFILE(E290PRDSRC/QRPGLESRC) MBR(E29RPP)
POSITION(*START)


I do a debug after the read statement and all the fields are empty but the
correct file member is open - I have checked the job using WRKACTJOB

I shall probably be embarrassed by the simplicity of the answer

Many thanks.


--
Rob Dixon

www.erros.co.uk
www.boarstall.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-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.