For Programmers: Free Programming Magazines  


Home > Archive > ASM370 > October 2004 > Compare char with ampersand in AIF or SETB









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Compare char with ampersand in AIF or SETB
Gilbert Saint-Flour

2004-10-28, 3:55 am

Hello:

I'm trying to figure our how to code a SETB instruction to check if a
one-byte character string contains an ampersand, an apostrophe or a hyphen.
Apost and hyphen work fine, but I can't find a way to get a match with the
ampersand. See my test case below. Thanks in advance for your help.

--
Gilbert Saint-Flour
http://gsf-soft.com


//GILBERTM JOB (ACCT#),STRING,
// NOTIFY=&SYSUID,
// CLASS=A,MSGCLASS=X,COND=(0,NE)
//HLASM EXEC PGM=ASMA90,PARM=(NOOBJECT,NORXREF)
MACRO
&NAME STRING
&I SETA 1
&J SETA 2
..*LOOP
..LIT11C ANOP
&K SETC '&SYSLIST(&I)'(&J,1)
&B SETB ('&K' EQ '&&' OR '&K' EQ '''' OR '&K' EQ '-')
MNOTE ' J=&J KK=&K&K B=&B '
&J SETA &J+1
AIF (&J LT K'&SYSLIST(&I) ).LIT11C
..*ENDLOOP
MEND
****************************************
***********************
STRING '&&'
STRING ''''
STRING '--'
END
//SYSPRINT DD SYSOUT=*
//SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR
//SYSUT1 DD UNIT=VIO,SPACE=(CYL,2)

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com