Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Static value in MFD DEFINE
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Static value in MFD DEFINE
 Login/Join
 
Master
posted
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
 
Posts: 561 | Registered: February 03, 2010Reply With QuoteReport This Post
<JG>
posted
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!'; ,$
 
Reply With QuoteReport This Post
Master
posted Hide Post
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
 
Posts: 561 | Registered: February 03, 2010Reply With QuoteReport This Post
<JG>
posted
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.
 
Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Reply With QuoteReport This Post
Master
posted Hide Post
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
 
Posts: 561 | Registered: February 03, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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 *.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Static value in MFD DEFINE

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.