So here's a table of 3 entries in some pgm csect...  

KywdTab  DS    0FD                                          
*                                                           
         DC    CL8'kywdAtxt',AL4(KywdArtn)                            
         DC    CL8'kywdBtxt',AL4(KywdBrtn)                    
         DC    CL8'kywdCtxt',AL4(KywdCrtn)                    
*                                                           

And here's a dsect describing an entry in the above table... 
*                                                                
TBENTRY  DSECT                          Overlay for keyword table    
KYWDTXT  DS    CL8                     keyword text 
KYWDRTN DS    AL4                    A(routine to process keyword)           


And elsewhere in your pgm csect you setup addressability to your table... 
*
       LA   Rx,KywdTab                   
       USING  TBENTRY,Rx
*
And when you've determined that you have some input that matches your table 
text probably via CLC  KYWDTDT,InputField  then...  

       L            R15,KYWDRTN                  A(rtn for this keyword) 
       BASR   R14,R15                                go handle processing for 
this kywd                                       

Each of the keyword processing routines might terminate with  BR  R14, 
resulting in branch back to whatever instruction followed the above BASR. 
As FancyDancer mentioned, all of the names used must be resolvable at assembly 
time.   

HTH, 
Mike 

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of FancyDancer
Sent: Saturday, April 24, 2021 12:12 AM
To: [email protected]
Subject: Re: Table processing question

Caution! This message was sent from outside your organization.

If all you have for FLD2 is the name of the field, then it won't work. The 
addressability of the name contained in the field FLD2 has to be resolved at 
assembly time. That is, if I understand your question.

If you can do it, then FLD2 could be an ADCON addressing the tagname that you 
want.

Dan Snyder

----- Original Message -----

From: "Fred Tinsley" <[email protected]>
To: [email protected]
Sent: Friday, April 23, 2021 11:41:31 PM
Subject: Table processing question

Hello,

I am trying to set up a table. Each entry will have two values, say FLD1 and 
FLD2. I search on FLD1, and if I find a match, I want to branch to the tagname 
specified in FLD2, and process accordingly for each FLD2 tagname in the 
program. I have the FLD2 name in a DSECT table record. But how do I build a 
branch instruction pointing to the tagname in FLD2?

Reply via email to