Mike,
Why don't you use embedded SQL in your RPG program... it would solve this issue.
If you want to keep native IO, have a look at the ExtFile keyword (OVRDBF is so outdated ;-) for the F-specification.
And if you want to solve this in a modern way, take a look at Websphere MQ (or even remote dataqueue's, however MQ is much better related to guaranteed and one time delivery) and "push" (pulling is a waste of resources) XML messages containing your transactions (so you get abstraction from your database) on the queue which you can then process in realtime on your System i.
As far as someone's comment of using members is concerned... I would not recommend this as members is not a real SQL thing (it is however supported via ALIAS'es if you really want).
Kind regards,
Paul
________________________________________
From: rpg400-l-bounces@xxxxxxxxxxxx [rpg400-l-bounces@xxxxxxxxxxxx] on behalf of Mike Wills [mike@xxxxxxxxxxxx]
Sent: Thursday, June 30, 2011 23:04
To: RPG programming on the IBM i / System i
Subject: DDL, RPG, and Daily Transactions from .NET program
We have a daily process that will be pulling data from our internet
server and putting it on the i into a work file. Because I am not
creative and am copying what we have done in the past, I create a file
called TRANYYMMDD (with YYMMDD in the appropriate date) one for each
day. I am doing this via CREATE TABLE in the .NET program.
On the i side, I do a DSPFD to get a list of the files, then use RPG
to read the created file. I want to do a OVRDBF on each file to
process it. (Boy this sounds more complicated than it should be).
Anyway, I am getting a "RNQ1011 Undefined record type is found in file
TRANYYMMDD" How do I get around this?
OVRDBF Statement:
OVRDBF FILE(TRANYYMMDD) TOFILE(&FILENAME) MBR(*FIRST) LVLCHK(*NO)
OVRSCOPE(*JOB)
Otherwise, how would you do this? I think the idea of the original
setup was to separate the daily transactions easily.
--
Mike Wills
http://mikewills.me
--
This is the RPG programming on the IBM i / System i (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.