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



Does the RPG compiler know when it's a single format file? Seems to me that it could deal with it on a file-by-file basis. Ahh, but then us silly programmers stick stuff in where it don't belong, like overrides to other files with multi formats.

In the infamous words of Emily Latilla... "Never mind!"

(Been wondering this for many years, but never put forth the effort to actually axe before.)

Duane

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Young
Sent: Wednesday, March 09, 2016 10:25 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: Re: Update failing on partial key

Duane,
Probably because the IBM i supports mutli format logical files and the update/write needs to know what format to update/write.

just my $.02 worth

Jeff Young
Sr. Programmer Analyst

On Wed, Mar 9, 2016 at 9:55 AM, Duane Scott <dscott@xxxxxxxxxxx> wrote:

My 2 cents worth... "not that anybody cares!"

Two reasons to always use the file name on %eof and %found: 1)
somebody (like me) will come along later and insert code somewhere and
then start experiencing what you did; B) it helps future programmers
know what file is at %eof was originally intended after what happens
in #1. It's self-documentation, not that documentation should be ignored.

I'm sure there are more reasons, but the above two are why I have
tried to make it a habit to put the filename there.

Now if I could only understand why IBM can't make RPG "update" and "write"
to file instead of only record format.

Duane

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Hoteltravelfundotcom
Sent: Wednesday, March 09, 2016 9:43 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <
rpg400-l@xxxxxxxxxxxx>
Subject: Re: Update failing on partial key

yeah i have fixed that part now.

dou %eof(srbpol)
pol reade srbpol
if not %eof(srbpol)

On Wed, Mar 9, 2016 at 9:37 AM, Michael Schutte
<mschutte369@xxxxxxxxx>
wrote:

truthfully, you stated that the line number had those values, you
didn't specify which field had those values. You left that open to
interpretation. Because of that I see svline (which you don't show
getting populated), I assume it's zero and you're attempting to set
orline to 00 for every record.

As mentioned in a previous email, you still have an issue with the read.
You are not checking for eof after your read.





On Wed, Mar 9, 2016 at 9:12 AM, Hoteltravelfundotcom <
hoteltravelfun@xxxxxxxxx> wrote:

I noted it changed from 00 to 20.

in this case, the first order line is 00 and they must have
skipped
10 the second is 20.

I noted it changed to 20 but then at update time it went back to 00.

I am assuming the issue is that the key read is order only.
I beleive i need to make an update key that would comprise the
order and line.



On Wed, Mar 9, 2016 at 8:05 AM, Michael Schutte
<mschutte369@xxxxxxxxx>
wrote:

In debug, what value is in svline on both the first and second
record?

You don't show where it's getting populated. We can only guess
that
it's
value is 00 on both records, thus duplicate record error on the
update.

On Tue, Mar 8, 2016 at 5:44 PM, Hoteltravelfundotcom <
hoteltravelfun@xxxxxxxxx> wrote:

I saw in the debug that it was reading the order lines. So the
partial
key
is working.
But I want to update the order lines with the passed warehouse.
Here
in
Update orppl the
first read is line number happens to be 00 but the second is
20 but at update it failed on duplicate record. So it seems
that its
trying
to
update 00 line
since the pol key has only the order#. is this correct what I
am
saying?
If
so, I need to update from another klist?

c pol setll srbpol
c if %equal
c dou %eof(srbpol)
c pol reade srbpol
c ohords iflt 30
c eval ohsrom = svsrom
c eval ohsrom = whs
c eval oloqty = svqty
c eval olline = svline
c update orppl
c*now take this line item and qty and update warehouse balances
c eval item = olprdc
c exsr step2
c endif
c enddo
c endif
c*
c endsr
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(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.

Please contact support@xxxxxxxxxxxx for any subscription
related questions.

--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

________________________________
________________________________
CONFIDENTIALITY NOTICE: This electronic message transmission is
intended only for the person or entity to which it is addressed and
may contain information that is privileged, confidential or otherwise
protected from disclosure. If you have received this transmission, but
are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution or use of the contents of this
information is strictly prohibited. If you have received this e-mail
in error, please contact NALC Health Benefit Plan at 703-729-4677 and
delete and destroy the original message and all copies.




--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (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.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

________________________________
________________________________
CONFIDENTIALITY NOTICE: This electronic message transmission is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this transmission, but are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this information is strictly prohibited. If you have received this e-mail in error, please contact NALC Health Benefit Plan at 703-729-4677 and delete and destroy the original message and all copies.





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.