Simple Array Help



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Simple Array Help

Postby nadecian » Wed Jun 16, 2010 7:40 pm

Hello can someone please help me learn arrays for my work.

My in-file has many records with the same acct# but different book-ids (one acct# can purchase many books)

My boss asked me to create a program where I show a single acct# with multiple book-ids on the same record (to help show buying trends from a single acct#)

sample output
(ACCT#)            BOOK-ID1            BOOK-ID2          BOOK-ID3   ETC.... Up to 20 purchases
75643334          ACTION123         ACTION222         SPORT222



Does anyone have some sample code I can work from as the easytrieve manual doesnt show anything.

thanks for your time,
N.
nadecian
 
Posts: 2
Joined: Wed Jun 16, 2010 7:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Simple Array Help

Postby dick scherrer » Wed Jun 16, 2010 11:56 pm

Hello and welcome to the forum,

Before you can code, you need to determine the rules.

One of particular importance is the maximum book-id's for an acct. . . What is to be done where there are too many to fit on one line?

If the input data is sorted by acct and book-id it is a straightforwrd process. If the data is not already sorted in this sequence, a subset of the file containing the acct/biook-id could be sorted for use as input.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post