× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 20 May 2013 14:47, Crystal Reports wrote:
I want to create a logical file which would only
include dates current

For an equal predicate, and if a DDS LF is a requirement, then a Join Logical File (JLF) can get the date from another file that has been updated to have whatever is considered the /current date/ in the desired data type; e.g. JFLD(OHORDT CURDATEFLD). Otherwise a DYNSLT LF can have the literal value for the test defined in the COMP keyword previously updated in a source member set to the /current date/ value, and then the CRTLF performed dynamically when required; e.g. created into QTEMP, the following selection:

.....A..........T.Name++++++.Len++TDpB......Functions++++
xxxxxA S OHORDT COMP(EQ 20130520)

The better option may be to just use the SQL and define the predicate in a VIEW using the CURRENT DATE special register. Or instead of a VIEW, the logic could be encapsulated in a[n effective] routine that accepts a value for whatever defines the /current date/ in the desired data type; e.g. host variable in embedded SQL.

this does not compile:

I OHORDT COMP(EQ UDATE)

The DDS LF source does not have an I-Spec, i.e. the Name-Type column does not support an 'I', so the above specification seems suspect, and probably correctly can not compile. For the COMP kwd in a PF or LF source, the Name Type specification must be either an 'S', an 'O', or blank. For the COMP to effect a compare-equal to the second element UDATE, the value UDATE must refer to a field name UDATE in the file.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.