So here's a table of 3 entries in some pgm csect...
KywdTab DS0FD
*
DCCL8'kywdAtxt',AL4(KywdArtn)
DCCL8'kywdBtxt',AL4(KywdBrtn)
DCCL8'kywdCtxt',AL4(KywdCrtn)
*
And here's a dsect describing an entry in the above table...
*
TBENTRY DSECT Overlay for keyword table
KYWDTXT DSCL8 keyword text
KYWDRTN DSAL4A(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...
LR15,KYWDRTN A(rtn for this keyword)
BASR R14,R15go 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:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On
Behalf Of FancyDancer
Sent: Saturday, April 24, 2021 12:12 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
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"
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
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?