|
"Rakesh Roshan , Gurgaon" wrote: > Subject: Sharing -- Getting JVM system properties = within RPGLE sample > JAVASYSR > > Hi everybody > Can anybody tell how to read the > records from the table = defined in a E-spec > thanx > Rakesh Rakesh, normally a table is not intended to be read like an ordinary array. If you want to be able to access the table directly, make it an ordinary array (give it a name that doesn't start with TAB), and access it with an index. But it is possible to access specific elements of a table. You need another table, say TABNUM, numeric with elements 1 2 3 4 etc. If you want to lookup say element 2, then LOKUP 2 in TABNUM, specifying your table in the result field. E TAB01 1 5 10 E TABNUM 1 5 5 0 * Display third element of TAB01 ("dog") C 3 LOKUPTABNUM TAB01 10 C TAB01 DSPLY * Display all of TAB01 in order C 1 DO 5 N 50 C N LOKUPTABNUM TAB01 10 C TAB01 DSPLY C ENDDO * C SETON LR ** fish cat dog aviator Paris ** 00001 00002 00003 00004 00005
As an Amazon Associate we earn from qualifying purchases.
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.