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



Good day everyone.

I have to write several records into a file (or table), for which there is
al field (or column), that is a sequential number, but for some key field
combination.

Say that I have some USER, TASK, SEQUENCE key combination, for which the
SEQUENCE would start from 1 through an arbitrary ending number.

USER1 ADD 1
USER1 ADD 2
USER1 ADD 3
and so on.

I was trying to do this for the sequence:

USER = USER1;
TASK = 'ADD';
SEQN = (start_seq_n += 1);

where start_seq_n would be initially 1. I was expecting, like in "C", that
the compiler would first evaluate the internal increment and assignment and
just then assign to SEQN the result, so as to save some lines of code. I
see it gives me an error. I thought this was possible in RPGLE.

If not that I'm doing something wrong, and the error is real, then I'd
suggest that the compiler be able to evaluate that as a recursive RVALUE
and then an LVALUE.

JS

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.