First of all apologies for the subject line.
I'm not too sure if it explains what I am looking for.
Anyway - before I forget - we are on V5r4
What I need to do is add records to a particular file.
The file record is pretty simple
FieldB 2 0
FieldC 1 0
FieldD 3 0
FieldA will be a constant value P
FieldB values 1 thru 99 inclusive
FieldC values 1 thru 7 inclusive
FieldD values 1 thru 7 inclusive
The new records need to be as the following
FieldA FieldB FieldC FieldD
P 1 1 1
P 1 1 2
P 1 1 3
P 1 1 4
P 1 1 5
P 1 1 6
P 1 1 7
P 1 2 1
P 1 2 2
FieldC will eventually max out at 7, changing to 1 with the next
record while FieldB will go to 2 Hopefully, this makes sense - but the
question becomes - is this possible to do in SQL?
Then as if that's not hard enough, only insert the record, if the
record is not already there.
I probably will have to do this in RPGILE, but I was just wondering if
it could be done in SQL I tried googling count and sequence to no
Anyway - as always - all answers gratefully accepted
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
Disclaimer: This message contains confidential information and is
intended only for the individual named. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system. E-mail
transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a result of
e-mail transmission. If verification is required please request a
hard-copy version. Any views or opinions presented are solely those of
the author and do not necessarily represent those of the company.
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,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
This mailing list archive is Copyright 1997-2015 by MIDRANGE dot 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 here. If you have questions about this, please contact