Focal Point
BETTER UNDERSTANDING "WITH"
October 04, 2007, 04:28 PM
WinstonSmith6076BETTER UNDERSTANDING "WITH"
WHEN GETTING (FOC104) DEFINE IN MASTER REFERS TO A FIELD OUTSIDE ITS SCOPE
THE IBI EXPLANATION AND FORUM DESCRIPTIONS IS NOT CLEAR TO ME. THIS IS THE DEINFE I ATTEMPTING TO USE:
DEFINE TRANSMIT_WHEN_MI/MDYY = HDATE(TRANSMIT_WHEN_MI_O,'MDYY'); $
HOW WOULD I ADD THE WITH?
Into the Memory Hole!
October 04, 2007, 04:37 PM
LeahWhen you put a define in an MFD, it has to be based on fields in the MFD as I understand it.
You might want to move your define to the Table request.
Leah
October 04, 2007, 04:47 PM
WinstonSmith6076ok, how would ou code that? I'm looking for a specific example.
Into the Memory Hole!
October 04, 2007, 04:56 PM
Leahquote:
DEFINE TRANSMIT_WHEN_MI/MDYY = HDATE(TRANSMIT_WHEN_MI_O,'MDYY');
Put the above define between any joins and the table file request.
JOIN.....
DEFINE FILE XYZ
TRANSMIT_WHEN_MI/MDYY = HDATE(TRANSMIT_WHEN_MI_O,'MDYY');
END
TABLE FILE XYZ
...
Leah
October 04, 2007, 05:35 PM
Francis MarianiIs TRANSMIT_WHEN_MI_O a field in the Master you have the define in?
Error 104:
FOC104) DEFINE IN MASTER REFERS TO A FIELD OUTSIDE ITS SCOPE:
The defined field refers to a field which is not in the same
segment as the DEFINE (for FIELDNAME=OLD) or to a field that is
not in this Master (for FIELDNAME=NEW).
What kind of db is it?
What version are you on?
What operating system?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 04, 2007, 07:16 PM
IngasI suppose that you have multisegment master-file.
Is it so?
In DEFINE you are can use WITH [segment keyfield] to place virtual field into specific segment.
AFAIK this is only for WF 7.x
In 5.x - virtual fields always placed in segment which fields they are using.
(I can be wrong in 5.x issues)
WF 7.6.2, WinNT/2K, MSSQL 2K, MSOLAP 2K, BID
October 04, 2007, 11:04 PM
susannahquote:
DEFINE TRANSMIT_WHEN_MI/MDYY = HDATE(TRANSMIT_WHEN_MI_O,'MDYY');
DEFINE TRANSMIT_WHEN_MI/MDYY
WITH somefieldname= HDATE(TRANSMIT_WHEN_MI_O,'MDYY');
is that what you wanted to know, Winston?
| In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
October 05, 2007, 01:28 PM
WinstonSmith6076Yes, that is the example I am seeking.
Thx
Into the Memory Hole!
October 09, 2007, 04:01 PM
ihfquote:
DEFINE TRANSMIT_WHEN_MI/MDYY WITH some MASTER FILE fieldname= HDATE(TRANSMIT_WHEN_MI_O,'MDYY');
Winston, hope this helps.
Ira 5.3.6