I have a challenge I have a field that I need to either remove or translate ' from not sure if its apostrophe or grave but i have never encounterd a field formatted like this before. its a TX50 , I know but that's what the report painter displays.
I started out with strip to no good and also tried CTRAN before I discovered the filed was not in fact an A4000 so any pointers will be appreciatedThis message has been edited. Last edited by: FP Mod Chuck,
if its TX50 field, have you tried DEFINE-ing it to an A50 or an A50V and then operating on the /A redefined field?
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
March 06, 2017, 05:09 PM
Waz
Yeah, I don't think any function works on a TX field.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
March 07, 2017, 08:38 AM
jgelona
Correct me if I am wrong, but TX is just the USAGE format. It says the field is text and display in lines of 50 characters per line. The ACTUAL format is A4000 or maybe even A4000V if it is a field in a relational table. Either way, DEFINE a field as A4000, set it equal to the text field and go from there.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
March 07, 2017, 09:44 AM
dhagen
Try using a native DB function in the DB_EXPR function:
RESULT/A4000V WITH xxx=DB_EXPR(some-expression-here);
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
March 07, 2017, 09:58 AM
Geoff Fish
The master file description says the actual is TX and the usage is TX50
quote:
Originally posted by jgelona: Correct me if I am wrong, but TX is just the USAGE format. It says the field is text and display in lines of 50 characters per line. The ACTUAL format is A4000 or maybe even A4000V if it is a field in a relational table. Either way, DEFINE a field as A4000, set it equal to the text field and go from there.
Tried that also tried SQL pass thru with dbms_lob.substr(adrconf_comment, 3900, 1) from alumni.adrconf
still characters showing incorrectly
quote:
Originally posted by jgelona: Correct me if I am wrong, but TX is just the USAGE format. It says the field is text and display in lines of 50 characters per line. The ACTUAL format is A4000 or maybe even A4000V if it is a field in a relational table. Either way, DEFINE a field as A4000, set it equal to the text field and go from there.
Let me be more specific. In our application we have hundreds of not thousands of small to large, freeform text fields. Everything from 50 characters to 4000 characters. I know this works.
In your master you have a field like this:
FIELD=TXT01 , LOC_TXT, TX50 , TX ,$
Now add this to the master:
FIELD=TXT01V, LOC_TXT, A4000 , A4000 ,$
If you want, could add a DEFINE to the master like this:
DEFINE TXT01V/A4000=TXT01;
Now do your function operations on TXT01V.
Either way should work
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
March 27, 2017, 02:37 PM
Geoff Fish
Sorry that is taken so long to test this I am still not able to get this to work. evin with define in the MFD i have not been able to get either strip, strrep or CTRAN to work.
However as HTML the character renders correctly. could I hold this file in some format and then read? I have even tried SQL passthru and wind up with the same characters.
If someone can tell me how to attache an image to this post ill be glad to do that