1

I would like to add the DIM() keyword to this - but the compiler complains?

$ConfEmlDS     UDS                  qualified DTAARA(TSACONFEML)  

enter image description here

James Wong
  • 4,529
  • 4
  • 48
  • 65
SalBonello
  • 11
  • 2

1 Answers1

1

It is not possible to code the DIM keyword for any variable that is mapped to a data area.

Here's how you can code your data structure:

First, define a template for your data structure elements:

 D $ConfEml_t      DS                  qualified template          
 D  $ConfEml                     41A                               
 D   $AllowYN                     1A   Overlay($ConfEml:1)         
 D   $EmailId                    40A   Overlay($ConfEml:2)         

Then define your UDS as a qualified data structure with a subfield defined LIKEDS your template, with the DIM keyword.

 D $ConfEmlDs     UDS                  qualified dtaara(TSACONFEML)
 D  arr                                likeds($ConfEml_t) DIM(10)  

To work with the data structure, code like this:

$ConfEmlDs.arr(1).$ConfEml
Barbara Morris
  • 3,195
  • 8
  • 10