Why not use ASASYMBF? https://www.ibm.com/docs/en/zos/2.2.0?topic=hsp-asasymbm-asasymbf-substitute-text-symbols
Shared via the Google app Sent from my iPhone Sent from my iPhone > On Apr 18, 2023, at 4:02 PM, Swarbrick, Frank > <[email protected]> wrote: > > Here's a simple call to printf from LE-enabled assembler. > > ceedsa , > ceecaa , > prntit ceeentry main=YES > call PRINTF,(fmtstr,3) > ceeterm > ppa ceeppa , > fmtstr dc c'Test %d!',x'0' > end prntit > > Output is: > Test 3! > > -----Original Message----- > From: IBM Mainframe Assembler List <[email protected]> On > Behalf Of Charles Mills > Sent: Tuesday, April 18, 2023 12:59 PM > To: [email protected] > Subject: [EXTERNAL] Re: Automatic Variable Insertion > > I know I have seen an example somewhere of calling printf() from assembler. > Printf() does not really do a WTO, but the form of it named sprint() returns > a string that you could WTO. > > The printf() family is super powerful -- more than you could hope to achieve > in a reasonable amount of macro coding. > > Charles > > > -----Original Message----- > From: IBM Mainframe Assembler List [mailto:[email protected]] > On Behalf Of Gary Weinhold > Sent: Tuesday, April 18, 2023 9:33 AM > To: [email protected] > Subject: Re: Automatic Variable Insertion > > We resolved this by creating using the TEXT= option with a register which > allowed us to use a single WTO MF=L and a single WTO MF=E for all WTOs. The > messages themselves are generated by a macro which has a LITERAL type (to > generate the constants), a DSECT form (to name where the variables are), and > a SPACE type, to reserve space in working storage for reentrant programs. > We don't use a macro to fill in the variables though. > > It seems like what you want is similar to an assembler version of the C > language printf library function. > > The information contained in this electronic communication and any document > attached hereto or transmitted herewith is confidential and intended for the > exclusive use of the individual or entity named above. If the reader of this > message is not the intended recipient or the employee or agent responsible > for delivering it to the intended recipient, you are hereby notified that any > examination, use, dissemination, distribution or copying of this > communication or any part thereof is strictly prohibited. If you have > received this communication in error, please immediately notify the sender by > reply e-mail and destroy this communication. Thank you. -------------------------------------------------------------------------------- This e-mail message, including any attachments, appended messages and the information contained therein, is for the sole use of the intended recipient(s). If you are not an intended recipient or have otherwise received this email message in error, any use, dissemination, distribution, review, storage or copying of this e-mail message and the information contained therein is strictly prohibited. If you are not an intended recipient, please contact the sender by reply e-mail and destroy all copies of this email message and do not otherwise utilize or retain this email message or any or all of the information contained therein. Although this email message and any attachments or appended messages are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the sender for any loss or damage arising in any way from its opening or use.
