how to retrieve data containing a profile character
Author: regis.vittaz@csgv.fr (mama)
how to retrieve data containing a profile character?
Thanks
Regis
Author: regis.vittaz@csgv.fr (mama)
how to retrieve data containing a profile character?
Thanks
Regis
Author: regis.vittaz@csgv.fr (mama)
how to retrieve data containing a profile character?
Thanks
Regis
Hi,
assume you want to retrieve the classic "AT&T":
In Uniface, there is a difference between the character "&"
and the profile character which is entered as <GOLD>&
Same goes for all other profile characters: if you mean a character as a profile, you have to enter the <GOLD>character instead.
Success, Uli
Author: regis.vittaz@csgv.fr (mama)
how to retrieve data containing a profile character?
Thanks
Regis
Hi,
The <GOLD>* was stored in the database. I want to retrieve all the occurences which contain this <GOLD>*
Thanks
Regis
Author: regis.vittaz@csgv.fr (mama)
how to retrieve data containing a profile character?
Thanks
Regis
Hi,
seems to be a not-so-complicated task, but please give me some more background on the situation:
- How was the <GOLD>* entered and came to your database
- What is the Field Interface where the <GOLD>* is located (variable length or fixed length field>?
- is it only to correct an accident or will this be a common processing for you?
Success, Uli
Author: regis.vittaz@csgv.fr (mama)
how to retrieve data containing a profile character?
Thanks
Regis
Hi,
First of all, I want to explain you how we work with uniface.
we work on AXP/VMS with a database Oracle/RDB. we use uniface with character mode.
I try to answer to your questions.
- How was the <GOLD>* entered and came to your database
On the asn file, we have the following line:
$swap_gold_profiles
So, when the users press the * touch, uniface translate the * to <GOLD>* and so on, for all the other gold profile.
- What is the Field Interface where the <GOLD>* is located (variable length or fixed length field>?
The field is database, String, C30. That's all. It is stored under a RDB Database.
- is it only to correct an accident or will this be a common processing for you?
It is an accident. and i want to correct it.
Author: regis.vittaz@csgv.fr (mama)
how to retrieve data containing a profile character?
Thanks
Regis
Hi,
if it is an accident only, the following strategy will help:
1) we do a retrieve on all records.
2) we go throug all the occurences, use $fieldprofile(Field)
Not tested, but the code may look like:
retrieve/e "myentity"
setocc "myentity",1
while ($dbocc("myentity") > 0 & $status > 0)
if ($fieldprofile(MYSTRING.MYENTITY) )
remocc "myentity"
else
discard "myentity"
endif
endwhile
store
commit
$fieldprofile can help you to stop these accidents
Success, Uli
Author: regis.vittaz@csgv.fr (mama)
how to retrieve data containing a profile character?
Thanks
Regis
Slightly less brutally, and assuming you want to keep the data the user entered. loop through the entity as above but myfield.myentity = $replace(myfield.myentity,1,".*","*",-1) repeat for any other gold characters stored then store myentity.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.