Strange characters in data

Michel Adam michela@kirk.nt.ca
Tue, 15 Jun 1999 11:49:57 -0700


It's been a while since I had to deal with this, but QUICK, by default,
will
strip incoming non-printing characters when the user enters a value.
There was a
parameter that could be used to disable this feature, but it escapes me
at the
moment. This probably explain why editing the field strips the
characters.

QTP has no such restriction, so it deals with whatever is in the record.

You would need to write a bunch of substitution statement to edit the
data.

One possibility, if the data is amenable to it, would be to scan untill
you reach a non-printing character, and then do a byte extract from 1 to
the character before the non-printing one.

It gets easier if you know for sure WHICH characters are at the end
of a field.

You will need to use the CHARACTER function to set up your test
character,
and then use the INDEX function to find it. Once you have the ending
position in the element, you're home free.

This is all based on what is available to me on MPE/ix.

Your mileage will vary ...

Michel Adam
michela@kirk.nt.ca

Jim Hamer a écrit:
> 
> Terry,
> 
> Is it possible that QTP doesn't realize that you have changed the field.
> I wonder if the field is automatically truncated in the initial buffer
> and when you manually truncate the field later, QTP fails to recognize
> there was a change and no update is done.
> 
> Try this. Save the value of the field, and after the OUTPUT use an ITEM
> statement to really change the value of the field. Try all 9s or spaces
> or 'Terry Pickering'. Then, put the saved value back in the field with a
> second ITEM statement. I think this might help.
> 
> Jim
> At 09:50 AM 99/06/15 -0700, you wrote:
> >>>>
> 
> > In QTP I've tried doing a truncate on the field, re-defined it,
> > everything to no avail. Any suggestions on how to strip out these
> > trailing characters using QTP?
> >
> > Terry Pickering        Consultant Extraordinare
> >
> >
> >
> >
> Thanks,
> 
> Jim = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> = = = = Subscribe: "subscribe powerh-l" in message body to
> majordomo@lists.swau.edu Unsubscribe: "unsubscribe powerh-l" in message
> to majordomo@lists.swau.edu powerh-l@lists.swau.edu is gatewayed one-way
> to bit.listserv.powerh-l This list is closed, thus to post to the list,
> you must be a subscriber.
> 
>   ------------------------------------------------------------------------
> 
>    Part 1.2       Type: Netscape Fichier (application/ms-tnef)
>               Encoding: base64
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.