Focal Point
[CLOSED] Freeform getting a fixform error

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1907077726

January 09, 2013, 02:02 PM
TomS.
[CLOSED] Freeform getting a fixform error
Hi All,

I'm trying to do a modify to pass variables from an html page. The fex then uses a modify using freeform to update the db2 table. However I'm getting the following error for each of the fields.

(FOC705) THERE HAS BEEN AN INVALID USE OF A TEXT FIELD IN FIXFORM

Any suggestions?

This message has been edited. Last edited by: Kerry,


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
January 09, 2013, 02:13 PM
Danny-SRL
Tom,

If I remember right, a text (FORMAT=TXn) field has to be the last in the list of fields.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

January 09, 2013, 03:34 PM
Waz
Yes, I think I remember that as well.

Can you post the code and master ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

January 10, 2013, 08:35 AM
TomS.
Thanks, that appears to be the case. The error message is present for all fields after the first TXn field.

However, I have multiple text fields...can there be more than one? If so should they all be listed at the end?

Here's what my master and fex look like...


FILENAME=MYTABLE, SUFFIX=SQLDS , $
SEGMENT=TCALL_CT, SEGTYPE=S0, $
FIELDNAME=FIELD1, ALIAS=FIELD1, USAGE=I9, ACTUAL=I4, $
FIELDNAME=FIELD2, ALIAS=FIELD2, USAGE=A9, ACTUAL=A9, $
FIELDNAME=FIELD3, ALIAS=FIELD3, USAGE=A36, ACTUAL=A36, $
FIELDNAME=FIELD4, ALIAS=FIELD4, USAGE=A36, ACTUAL=A36,MISSING=ON, $
FIELDNAME=FIELD5, ALIAS=FIELD5, USAGE=A36, ACTUAL=A36,MISSING=ON, $
FIELDNAME=FIELD6, ALIAS=FIELD6, USAGE=A36, ACTUAL=A36,MISSING=ON, $
FIELDNAME=FIELD7, ALIAS=FIELD7, USAGE=TX50, ACTUAL=A295V, $
FIELDNAME=FIELD8, ALIAS=FIELD8, USAGE=A4, ACTUAL=A4, $
FIELDNAME=FIELD9, ALIAS=FIELD9, USAGE=A8, ACTUAL=A8, $
FIELDNAME=FIELD10, ALIAS=FIELD10, USAGE=A23, ACTUAL=A23, $
FIELDNAME=FIELD11, ALIAS=FIELD11, USAGE=A16, ACTUAL=A16, $
FIELDNAME=FIELD12, ALIAS=FIELD12, USAGE=A12, ACTUAL=A12, $
FIELDNAME=FIELD13, ALIAS=FIELD13, USAGE=TX50, ACTUAL=A295V, $
FIELDNAME=FIELD14, ALIAS=FIELD14, USAGE=A20, ACTUAL=A20, $
FIELDNAME=FIELD15, ALIAS=FIELD15, USAGE=A20, ACTUAL=A20, $
FIELDNAME=FIELD16, ALIAS=FIELD16, USAGE=A12, ACTUAL=A12, $
FIELDNAME=FIELD17, ALIAS=FIELD17, USAGE=A12, ACTUAL=A12, $
FIELDNAME=FIELD18, ALIAS=FIELD18, USAGE=A1, ACTUAL=A1, $
FIELDNAME=FIELD19, ALIAS=FIELD19, USAGE=TX50, ACTUAL=A295V, $
FIELDNAME=FIELD20, ALIAS=FIELD20, USAGE=I9, ACTUAL=I4, $
FIELDNAME=FIELD21, ALIAS=FIELD21, USAGE=A26, ACTUAL=A26, $
FIELDNAME=FIELD22, ALIAS=FIELD22, USAGE=A26, ACTUAL=A26, $
FIELDNAME=FIELD23, ALIAS=FIELD23, USAGE=MDYY, ACTUAL=DATE, $
FIELDNAME=FIELD24, ALIAS=FIELD24, USAGE=TX50,ACTUAL=A295V, $
FIELDNAME=FIELD25, ALIAS=FIELD25, USAGE=I9, ACTUAL=I4, $
FIELDNAME=FIELD26, ALIAS=FIELD26, USAGE=A1, ACTUAL=A1, $
FIELDNAME=FIELD27, ALIAS=FIELD27, USAGE=A8, ACTUAL=A8, $



TABLE FILE MYTABLE
SUM
MAX.FIELD1
ON TABLE HOLD FORMAT ALPHA
END
-RUN
-READ HOLD &FIELD1.9

-SET &FIELD1 = &FIELD1 + 1;


MODIFY FILE MYTABLE
FREEFORM FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6
FREEFORM FIELD7 FIELD8 FIELD9 FIELD10 FIELD11 FIELD12
FREEFORM FIELD13 FIELD14 FIELD15 FIELD16 FIELD17
FREEFORM FIELD18 FIELD19 FIELD20 FIELD21
FREEFORM FIELD22 FIELD23 FIELD24 FIELD25
FREEFORM FIELD26 FIELD27
MATCH FIELD1
ON MATCH REJECT
ON NOMATCH INCLUDE
DATA
&FIELD1, &FIELD2, &FIELD3, &FIELD4, &FIELD5, &FIELD6,
&FIELD7, &FIELD8, &FIELD9, &FIELD10, &FIELD11, &FIELD12,
&FIELD13, &FIELD14, &FIELD15, &FIELD16, &FIELD17,
&FIELD18, &FIELD19, &FIELD20, &FIELD21, &FIELD22,
&FIELD23, &FIELD24, &FIELD25, &FIELD26, &FIELD27,$
END

This message has been edited. Last edited by: TomS.,


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
January 10, 2013, 10:20 AM
Danny-SRL
Tom,
The only workaround I am aware of is to use as many MODIFYs as there are TX fields...


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

January 10, 2013, 10:42 AM
Tom Flynn
Try this way:
  
FREEFORM FIELD1/I4 FIELD2/A9 FIELD3/A36 FIELD4/A36 FIELD5/A36 FIELD6/A36 
FREEFORM FIELD7/A295V FIELD8/A4 FIELD9/A8 FIELD10/A23 FIELD11/A16 FIELD12/A12 
FREEFORM FIELD13/A295V FIELD14/A20 FIELD15/A20 FIELD16/A12 FIELD17/A12 
FREEFORM FIELD18/A1 FIELD19/A295V FIELD20/I4 FIELD21/A26
FREEFORM FIELD22/A26 FIELD23/YYMD FIELD24/A295V FIELD25/I4 
FREEFORM FIELD26/A1 FIELD27/A8 



Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
January 10, 2013, 03:32 PM
Waz
I would suggest using a second master that has the TX fields defined as A295.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

January 11, 2013, 03:35 AM
Danny-SRL
Tom (Flyn),
If Tom(S) says he is using FREEFORM, this means that his data is comma-delimited. Are you suggesting he switches to FIXFORM?
Also, did you ever try a variable-length input with MODIFY?

Waz,
This might work. I hope that SQLDS would know how to convert a fixed length field into a variable one.

Good luck to all...


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

January 14, 2013, 09:46 AM
TomS.
Sorry for the delay, I was pulled onto another project...So, moving all the tx fields to the end of the FREEFORM cleared up the INVALID USE OF A TEXT FIELD error. However, now nothing is being passed and I'm getting the following result

0 TRANSACTIONS: TOTAL = 0 ACCEPTED= 0 REJECTED= 0
SEGMENTS: INPUT = 0 UPDATED = 0 DELETED = 0

I tried doing multiple MODIFY's and get the same result.

Waz, how can I create a second master for the table?

This message has been edited. Last edited by: TomS.,


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
January 14, 2013, 01:23 PM
TomS.
I tried leaving out some of the TX fields so there was only one at the end of the MODIFY and it came back with this error.

Not sure where to go from here...

(FOC14069) SYNTAX ERROR ON LINE 8 AT 'T24' -- Data type not found
(FOC14112) STATEMENT WAS NOT BOUND
(FOC1400) SQLCODE IS 14069 (HEX: 000036F5)
: SYNTAX ERROR ON LINE 8 AT 'T24' -- Data type not found
(FOC1740) EXECUTE ERROR : MYTABLE
0 TRANSACTIONS: TOTAL = 1 ACCEPTED= 1 REJECTED= 0
SEGMENTS: INPUT = 0 UPDATED = 0 DELETED = 0


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
January 14, 2013, 03:11 PM
Danny-SRL
Tom(S),

Copy your MASTER and ACX files.
Give them another name, e.g. NEWTABLE
In your master replace all TXs with A295V.
Run your program replacing the filename in the MODIFY command.
See if this works.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

January 18, 2013, 01:16 PM
TomS.
My delay in responding is due to me being pulled in a few different directions...

Anyways, I've tried editing the master, creating a new master, switching to fixform, and removing all but one of the tx fields. All to no prevail.

It turns out that we are making some changes to the information being collected so I'll be creating a new DB with less fields. This new DB wont have any tx fields so i'm hoping that will clear up the issue.

Thank you all for your help.
-Tom


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML