Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving data area into an array

Status
Not open for further replies.

Jaytib

Programmer
Sep 7, 2010
19
US
I am trying to convert this piece of code to freeform, but I am not sure what to do, tried several different things from online forums, but not working , can you help? Not very good at working with arrays.

D ZXB S 9 0 DIM(10)

D XITEM DS DTAARA(INAXCLUD)
D WXCLUD 90A
D ZXA 9A OVERLAY(WXCLUD) DIM(10)


IN LDA
* Retrieve data area, INAXCLUD: items
* to exclude from report. Put in array, ZXB.

C IN XITEM
C MOVE ZXA ZXB

Thanks!
 
ZXA should be defined as (9S 0). You don't need ZXB.

Code:
D XITEM           DS                  DTAARA(INAXCLUD)       
D WXCLUD                        90A                          
D  ZXA                           9S 0 OVERLAY(WXCLUD) DIM(10)
                                                             
 /free                                                       
   // IN operation below retrieves the data area contents.
   // After the operation, the data are immediately 
   // available in the ZXA array.
   IN XITEM; 
   DSPLY ZXA(1);

Philippe
 
Thanks for the explanation in comments, being a newbee, I appreciate that. U R the best!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top