And of course the "(&I LE 8)" and  "(&J LE 8)" should have used 3 and not 8 as 
the limit.  Forgot to edit that from the actual code, which does use 8, but I 
tried to simplify for my question here.

Peter

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Farley, Peter x23353
Sent: Friday, October 03, 2014 7:49 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Syntax for using created SET symbols in a SETC value?

It's been quite a while since I did any serious macro programming, and I am 
more than a bit rusty here.  Any help you can provide is appreciated.

If I have the following macro symbol definitions:

        GBLC  &F1(3),&F2(3),&F3(3)
        LCLC  &C
        LCLA &I,&J

And I then give the dimensioned variables their values using the extended SETC 
syntax:

&F1(1)    SETC 'A','B','C'
&F2(1)    SETC 'D','E','F'
&F3(1)    SETC 'G','H','I'

And then I want to dump all of these in the sequence F1(1), F1(2), F1(3), 
F2(1),  . . ., F3(3):

&I        SETA  1                    
.LOOPI    ANOP  ,                    
&J        SETA  1                    
.LOOPJ    ANOP  ,                    
&C        SETC  '&(&(F&I)(&J))'   <== This line generates errors   
F&I.&J  DC    C'&C'               
&J        SETA  &J+1                 
          AIF   (&J LE 8).LOOPJ      
&I        SETA  &I+1               
          AIF   (&I LE 8).LOOPI    
.DONE     ANOP  ,                    

What is the right syntax for generating the value of &C here?  The line marked 
(<==) above generates HLASM errors like this:

** ASMA003E Undeclared variable symbol; default=0, null, or type=U - 00143/F
** ASMA083E Created SET symbol is not a valid symbol - 00143/1                  
** ASMA082E Created SET symbol is null - 00143                                  
** ASMA435I Record 34 in TSOUSER.TEST.PDS(TESTMACS) on volume: XXXXXX         
000000                              155+F11        DC    C''                    
** ASMA068S Length error - '                                                    
** ASMA435I Record 35 in TSOUSER.TEST.PDS(TESTMACS) on volume: XXXXXX         

TIA for your help.

Peter
--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

Reply via email to