Focal Point
[SOLVED] Static value in MFD DEFINE

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

October 04, 2010, 11:25 AM
ABT
[SOLVED] Static value in MFD DEFINE
Folks, I am having a little trouble getting this off the ground and I'm not really sure why (it seems straightforward enough). Can someone sanity check me on this?

I want to DEFINE a column to my MFD with a hard coded value (nevermind why, I swear it makes sense). Per the 'Describing Data...' manual, it should be written as the following (field HELLOWORLD):

FILENAME=PS_JOB_TEST, SUFFIX=SQLORA  , $
  SEGMENT=PS_JOB_TEST, SEGTYPE=S0, $
    DEFINE HELLOWORLD/A12 = 'HELLO WORLD!'; $
    FIELDNAME=EMPLID, ALIAS=EMPLID, USAGE=A11, ACTUAL=A11, $
    FIELDNAME=EMPL_RCD, ALIAS=EMPL_RCD, USAGE=I11, ACTUAL=I4, $


When I run this, I get no error but I don't see my field (HELLOWORLD).

What am I doing wrong?
-ABT

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


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
October 04, 2010, 04:19 PM
<JG>
Try ending the DEFINE correctly ;,$ not ;$

By preference, defines should be placed at the end of segment to which they apply.
Try
FIELDNAME=EMPLID, ALIAS=EMPLID, USAGE=A11, ACTUAL=A11, $
FIELDNAME=EMPL_RCD, ALIAS=EMPL_RCD, USAGE=I11, ACTUAL=I4, $
DEFINE HELLOWORLD/A12 = 'HELLO WORLD!';, $

OR
Your define has no reference point.
FIELDNAME=EMPLID, ALIAS=EMPLID, USAGE=A11, ACTUAL=A11, $
FIELDNAME=EMPL_RCD, ALIAS=EMPL_RCD, USAGE=I11, ACTUAL=I4, $
DEFINE HELLOWORLD/A12 WITH EMPID = 'HELLO WORLD!'; ,$
October 04, 2010, 05:09 PM
ABT
Thanks JG, but no go on your suggestions. Same effect. No error. I get results, just missing the field I DEFINEd.

FILENAME=PS_JOB_TEST, SUFFIX=SQLORA  , $
  SEGMENT=PS_JOB_TEST, SEGTYPE=S0, $
    FIELDNAME=EMPLID, ALIAS=EMPLID, USAGE=A11, ACTUAL=A11, $
    FIELDNAME=EMPL_RCD, ALIAS=EMPL_RCD, USAGE=I11, ACTUAL=I4, $
        .
        .
        .
    FIELDNAME=JOB_DATA_SRC_CD, ALIAS=JOB_DATA_SRC_CD, USAGE=A3, ACTUAL=A3, $
    FIELDNAME=ESTABID, ALIAS=ESTABID, USAGE=A12, ACTUAL=A12, $
DEFINE HELLOWORLD/A12 WITH EMPLID='HELLO WORLD!';, $


- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
October 04, 2010, 05:18 PM
<JG>
ABT,

Can you knock up a quick repro on the car file or any other \IBISAMP DB.

That would allow most of the forum to play with it, becuase we obviously can't see your system.
October 04, 2010, 11:13 PM
Dan Satchell
I put the same DEFINE in the CAR master and it worked fine. Don't forget that you cannot display a DEFINEd field with a PRINT *. You must specifically reference the DEFINEd field in your TABLE request in order for it to display on the report.


WebFOCUS 7.7.05
October 05, 2010, 08:27 AM
ABT
Dan, good call.

I was in fact PRINT * -ing it and didn't see my field (nor do I see it in a ?FF PS_JOB_TEST). I do see it when explicitly referencing it. Case closed, but still not sure if this is a good thing or a bad thing. Smiler

Thanks all!

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
October 05, 2010, 09:45 AM
j.gross
I imagine you could create a Business View, referencing the Define as a Field. Then it should be treated as such and included in PRINT *.