[SOLVED] Field disappears after DEFINE on hold table
This --
? HOLD DB2_LICENSE_XFOC
SET SQLENGINE=SQLMSS SQL SET SERVER wfdatamart
DEFINE FILE DB2_LICENSE_XFOC ADD DB2_HAS_ICN/A3 = IF TX_ICN NE '' THEN 'Yes' ELSE 'No'; DRIVERS_LICENSE_CLASS/A30V = IF TX_LIC_CLAS EQ 'A' THEN 'Drivers_License' ELSE IF TX_LIC_CLAS EQ 'B' THEN 'Drivers_License' ELSE IF TX_LIC_CLAS EQ 'C' THEN 'Drivers_License' ELSE IF TX_LIC_CLAS EQ 'M' THEN 'Motorcycle_License' ELSE IF TX_LIC_CLAS EQ 'I' THEN 'ID_Card' ELSE IF TX_LIC_CLAS EQ 'K' THEN 'Moped_Permit' ELSE IF TX_LIC_CLAS EQ 'N' THEN 'Learners_Permit' ELSE IF TX_LIC_CLAS EQ 'O' THEN 'Learners_Permit' ELSE IF TX_LIC_CLAS EQ 'P' THEN 'Learners_Permit' ELSE IF TX_LIC_CLAS EQ 'R' THEN 'Learners_Permit_Motorcycle' ELSE 'Unknown'; DRIVERS_LICENSE_TYPE/A30V = IF TP_LIC EQ 'C' THEN 'Correction' ELSE IF TP_LIC EQ 'D' THEN 'Duplicate' ELSE IF TP_LIC EQ 'G' THEN 'Gratis' ELSE IF TP_LIC EQ 'N' THEN 'New' ELSE IF TP_LIC EQ 'R' THEN 'Renewal' ELSE 'Unknown'; Year_Expiring/A4 = EDIT(DT_EXP, '9999'); Month_Expiring/A2 = EDIT(DT_EXP, '$$$$$99'); Date_Recorded/HYYMD = HGETC(8, 'HYYMDS'); RealId_Compliant_Not_Null/A3V = IF REALID_COMPLIANT EQ MISSING THEN 'Unk' ELSE REALID_COMPLIANT; DATE_ISSUED/A10 = DATE_ISSUED; END
The DT_ISS field disappeared after the Define. This is killin' me, because I need the field, and I need the defines. Anyone have any clues?This message has been edited. Last edited by: FP Mod Chuck,
March 27, 2019, 04:56 PM
Waz
No real suggestions, but could the HOLDMETA be causing issues ?
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 28, 2019, 08:12 PM
John_Edwards
Could be anything. This is a weird one.
March 28, 2019, 08:40 PM
Waz
I guess the next step is either contacting Tech Support or start standard debugging techniques.
i.e. Start commenting out blocks of code till it is there, then put code back in till it disappears again.
You could also turn tracing on to see if sheds any light.
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 29, 2019, 07:43 AM
BabakNYC
What version/gen of WebFOCUS are you running? Does this behavior reproduce on a sample file?
WebFOCUS 8206, Unix, Windows
March 29, 2019, 08:37 AM
jnc
I would probably start with a WHENCE MASTER and make sure you are reading the right master file.
HOLD files / FOCUS files don't really have AnV formats. So, I would remove the V's from your defines.
I never like to define a field with the same fieldname. Can the name of DATE_ISSUED be changed.
Or, can you add another define after that last define. Something simple like X/A1 = ' '; because I have previously seen no error message when the last define fails.
WebFocus 7x, 8x, Win / Linux, any output format
March 29, 2019, 09:12 AM
Addy
Hi John, I see the FOCLIST is created twice. Not sure if the new define is getting appended to the old define or is it overwriting the old define.
Do it throw field not fould when you are calling the field in you table file section?
WF 8.2.04 Windows/Unix All Formats In Focus since 2006
March 29, 2019, 09:53 AM
John_Edwards
First of all, I'm not going to reproduce and open a ticket because that's not what gets the job done at my customer. I can't bill them to help IBI fix a problem, and I can't miss deadline.
So if someone has seen this before and has a useful fix I'm all ears, but I can't pursue in a ticket short of burning weekend time for my own devices.
The line assigning DATE_ISSUED the value of DATE_ISSUED in the Define was an attempt to correct this error, was not there when the problem first appeared.
I can remove the variable lengths and will do so.
I can move the APP HOLDMETA and will do so.
There is no prior DEFINE. I put the ADD on in an attempt to solve this problem.
And yes, I found the problem when reporting against the joined tables. The synonym checks are just there to show the effect (originally there to prove I'm not insane when a field I had clearly just added was there one moment, gone the next.)
Anyone panicking that machines are poised to replace humans need merely look at what we all do for a living to sleep soundly tonight.This message has been edited. Last edited by: John_Edwards,
March 29, 2019, 10:34 AM
John_Edwards
Solution -- Moving the APP HOLDMETA and APP HOLDDATA lines to higher up in the focexec corrected the problem.
Thank you much! I can get back to working on this critter!