|
Data Structures are by definition of character data type. Your Data Area is defined as numeric, (and hence contains just a single numeric value). If my memory is correct, you cannot therefore map a Data Structure over a numeric Data Area. You CAN map a (packed) numeric subfield - or regular variable - over a numeric Data Area as follows: C *NAMVAR DEFN LAVGCL AVGCLL 52 C IN AVGCLL * C AVGCLL DSPLY'*EXT' C MOVE *ON *INLR or ILAVGCL DS I P 1 32AVGCLL C *NAMVAR DEFN LAVGCL AVGCLL C IN AVGCLL * C AVGCLL DSPLY'*EXT' C MOVE *ON *INLR Incidentally, the 'U' in UDS just means the Data Area will be implicitly read in (and written out) during program initialisation (and termination). This has nothing to do with the *LDA - unless you leave the Data Structure name blank - whereupon the *LDA is assumed. Confusing? RPG IV makes the rules much easier to follow through the use of the DTAARA keyword on the D-spec. Brian Parkins
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.