STRING64 doc carries this warning:
it will produce assembly errors in the following situations:                    
                                   
  a.  STRING is used in more than one CSECT in the same assembly    

An alternative, which does not have this restriction, is found as the STRMAKE 
macro, part of the SYSMACS member of CBT file 669.

Willy


-----Oprindelig meddelelse-----
Fra: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> På vegne af 
Farley, Peter
Sendt: 18. april 2023 07:15
Til: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Emne: Re: Automatic Variable Insertion

CBT file 321 (COBANALZ) also has an updated version of the STRING macro named 
STRING64 with supporting code that is very useful.  Browse the source of 
COBANALZ (or better an assembly listing) to see it in action.

Peter

-----Original Message-----
From: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> On Behalf 
Of Brian Westerman
Sent: Tuesday, April 18, 2023 12:34 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Automatic Variable Insertion

There is a very useful macro on the CBTTAPE called STRING.

You can do something like 

STRING 'something ',(fielda,,T),' something else ',(0(R1),6,T),' Register 1 
=',((R1),,X),INTO=somefield

the STRING macro automatically puts the length of the string it builds into the 
SOMEFIELD in register 15 so you can STH R15 intop the first two bytes of the 
WTO field.

the above assumes that fielda is a text field of some length, (the ",,T" tells 
it to truncate ending blanks), and in this case R1 points to some other field 
of undetermined length that you want the first 6 bytes of (only up to the first 
blank field in those 6 bytes), and R1 is printed out in 8 hex characters.

The SHOWZOS command makes a lot of use of this macro, (also avaialable on the 
CBTTAPE)

It's very useful in instances where you have a lot of variables of different 
formats that you need to move around or generate messages from.

Brian Westerman
--

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