Character replace in Quiz

Robert Mills robert.mills@windsong-services.co.uk
Thu, 6 Jan 2005 15:34:39 -0000


Paul,

If it was as simple as that I would use 'tr' (posix translate filter command).

The PC application that processes this file expects to see a semi-colon between each field in the record. The char*30 field in question is the only one a user could enter semi-colons into. As it's the 3rd field out of 50 then each additional semi-colon would push the remaining data 1 field position further away from where it should be.

Think I'll stay with Dave's suggestion.

regards,

Robert W.Mills
Systems Development Manager
Windsong Services
(020) 8309 3604


powerh-l-admin@lists.sowder.com wrote:
> You can also sen your report on a disc file (set report device disc),
> and before printing your file, use qedit in order to replace all ';'
> by ' '. 
> 
> regards,
> paul diaconescu
> 
> 
>> From: "Knox, Dave (Dallas, CSC)" <KnoxDa01@unisourcelink.com>
>> To: "'Robert Mills'" <robert.mills@windsong-services.co.uk>,  
>> "PowerHouse Mail List (E-mail)" <powerh-l@lists.sowder.com>
>> Subject: RE: Character replace in Quiz
>> Date: Wed, 5 Jan 2005 13:46:03 -0500
>> 
>> Robert
>> 
>> Use MPE system functions to do it for you...
>> 
>> In your quiz...
>> 
>> define D-REPLACE char*50 = '![repl("' + NAME + '",";"," ")]'
>> define D-NAME char*30 = getsystemval("D_REPL") if
>> setsystemval("D_REPL",D-REPLACE)
>> 
>> Where NAME is your source field and D-NAME is the result.
>> 
>> Regards
>> Dave Knox
>> 
>> 
>> -----Original Message-----
>> From: powerh-l-admin@lists.sowder.com
>> [mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Robert Mills
>> Sent: Wednesday, January 05, 2005 12:06 PM
>> To: PowerHouse Mail List (E-mail)
>> Subject: Character replace in Quiz
>> 
>> 
>> 
>> Greetings to the -L,
>> 
>> Environment: Quiz 8.39.C running on MPE/iX 6.5
>> 
>> I have a char*30 source field that may contain any number of
>> semi-colons which I need to replace with spaces. Any advice on the
>> most efficient way of doing this?
>> 
>> regards,
>> 
>> Robert W.Mills
>> Systems Development Manager
>> Windsong Services
>> (020) 8309 3604
>> 
> 
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.sowder.com
> Subscribe: "subscribe" in message body to
> powerh-l-request@lists.sowder.com 
> Unsubscribe: "unsubscribe <password>" in message body to
> powerh-l-request@lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l 
> This list is closed, thus to post to the list you must be a
> subscriber.