Re: is there a way in rpgle to move data to a field who's name is the value of another field?

Could overlay the names of the fields over a Date Array

The below syntax is incorrect but you get the idea.

D Date DS dim(50)
D AK overlay(Date)
D AL overlay(Date:9)
D AR overlay(Date:17)
D CA overlay(Date:25)
D DE overlay(Date:33)

C eval x = 1
C mastat lookup state_value x
C eval date(x) = mdate

compile time arrary

On 28 May 2004 16:36:54 -0700, mol@xxxxxxx (MollyZ) wrote:

I have one file(AGTMSTR) that lists agents,[AGTNO] the fields are the
state they are licensed in, [MSTAT] the date[MDATE] they were
licensed. I need to populate a file (WEBAGT) that has the fields
[AGTNO], [CT], [NY], [FL], [DE], [DC]..... the fields with state names
are supposed to have the date they were licensed in. Rather than
write a 50 line select statement


I would like to say MOVE MDATE fld(MSTAT) or something.

hope I explained myself well enough

any ideas??



Relevant Pages

  • Re: some confusing in subroutine
    ... >> the next, the array A,B,C is used like they has more than one element? ... > are not known at compile time, and may even be variable at run time. ... It's a valid syntax, but the program ... > branches to one of three labelled statements depending upon whether the ...
  • Re: VBA Constant init
    ... First, Dim your array to a fixed size, then when you know the row count, or as the row count changes, ReDim it. ... For syntax, etc..., type "ReDim" into your VBA IDE, highlight it, and hit F1. ... the number of rows is not known at compile time. ...
  • Re: .join() !== + a + b; // for some a and b
    ... The one seemed obvious until your more detailed explanation below, ... that made it necessary to look deeper into the syntax. ... one an Array object reference and one ... seems wrong with the expression evaluation on the left side of the logical ...
  • Re: RPL+
    ... I'm upsetting the syntax here. ... If SIGN is an array, ... I understand that RPL in HPs also ... speed gap grew as the number of locals increases. ...
  • Re: RPL+
    ... I'm upsetting the syntax here. ... C and RPL syntaxes are orthogonal. ... If SIGN is an array, ... speed gap grew as the number of locals increases. ...