> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Gil, Victor x28091
> Sent: Wednesday, August 03, 2005 11:03 AM
> To: IBM-MAIN@BAMA.UA.EDU
> Subject: ISREDIT macro and ampersands
> 
> 
> When a source line happens to contain an ampersand it can 
> still be read by
> 
>       ISREDIT (THELINE) = LINE &ROW
> 
> However, an attempt to rewrite it back [even unchanged!]
> 
>       ISREDIT LINE &ROW = &THELINE    
> 
> fails, and so does an attempt to examine its contents with the &SUBSTR
> function.
>    
> I've looked through the manuals, tried SCAN OFF/ON but ended up with
> replacing the ampersands BEFORE reading the line 
> 
>       ISREDIT LABEL &ROW = .CURR                
>       ISREDIT CHANGE X'50' X'EF' .CURR .CURR ALL
> 
> and restoring them back later   
> 
>       ISREDIT CHANGE X'EF' X'50' .CURR .CURR ALL
> 
> This works [except for the rare case when X'EF' is actually 
> part of the
> original source code and thus gets mistakenly replaced with 
> the ampersand]
> but just doesn't feel right. I guess it would if the restore was done
> through UNDO but it's unavailable to ISREDIT.
> 
> Am I missing something stupid or is this a known limitation?
> 
> Thanks!
> -Victor- 

Well, I'd use REXX. But can't you use the &SYSNSUB function of CLIST?

ISREDIT LINE &ROW = DATALINE &SYSNSUB(1,&THELINE)

or

ISREDIT LINE &ROW = DATALINE (THELINE)

I think this last will work.

--
John McKown
Senior Systems Programmer
UICI Insurance Center
Information Technology

This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and its'
content is protected by law.  If you are not the intended recipient, you
should delete this message and are hereby notified that any disclosure,
copying, or distribution of this transmission, or taking any action
based on it, is strictly prohibited.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to