|
Can you use indirect addressing for field and array names in ILE? Consider the following: I am writing a spreadsheet program, each line representing an array, 8 fields x 12 periods = 72 elements. The array names, and the spreadsheet is defined as a compile time table, with the array name and the description, with control character, i.e. New page, Single underline, Double underline, Total, Source layout is: 1 - 1 Control, i.e. H=Hdg, S=Single underline, D=Double, T=Total 2 - 2 blank 3 - 6 array name, if Control=T 7 - 7 blank 8 - 37 description for total line 38 - 38 blank 39 - 39 2, for 2 decimal positions 40 - 40 blank 41 - 60 Array containing reporting codes to summarize amounts to. The logic reads the data base file, add amounts to array depending on the codes in the data base file. A work array, 8 x 12 = 72, is calculated before added to the array on the report. I want to LOKUP using report code, get the array name, then add the work array to the array, indirectly addressed by the index of the line containing the codes. I.E. add work array to array who contains the codes valid for the report line. Then I can add any lines to the report, define the arrays, and change the number of entries in the compile time array, and use indirect addressing to perform the calcs. The program will create 2 arrays from the compile time table, before reading the data base file: Report code array: 200 x 3 alpha Array to add to 200 x 4 alpha. The report / spreadsheet is user defined once, with report line calculations, i.e. Line10 = sum(line1 to line 9), etc. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the Midrange System Mailing List! To submit a new message, * * send your mail to "MIDRANGE-L@midrange.com". To unsubscribe from * * this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe MIDRANGE-L' in the body of your message. Questions * * should be directed to the list owner / operator: david@midrange.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.