Considering the format of the log, the most natural way to do this would be 
with the LIST.ITEM command. LIST.ITEM creates output like COPY, but is a query 
command so allows criteria/headings/limiters/etc.

If you want something more comprehensive, use Dan's suggestion of i-types. It 
doesn't matter if LOWER() works in the release you are running, you can use the 
SUBR() function in an i-type to call a subroutine, and the subroutine could 
step through the lines of the log and parse it into more usable dates and 
comments. Use 2 i-types calling the same subroutine with a flag parameter, one 
that extracts the dates and a second that extracts the comments, returning them 
as "normal" value-delimited strings so you can do queries by date as well as by 
customer.

Instead of an i-type, you can use an a-type dictionary with the CALL or B 
correlative, which also calls a subroutine.
Or you could recode the creation of the log :) If that is out of the question, 
you could use a trigger to make a more usable reformatted copy of the log.


On Oct 13, 2014, at 7:44 PM, [email protected] wrote:

> Thanks for reading my post.  I'm trying to display all entries from a log 
> file using its index (customerID).
> 
> Some sample records from the log file might look like this:
> 
> 123456
> 001 9/12/2014 Spoke with Bob on the phone.
> 002 Confirmed date of departure.  Reminded
> 003 Bob to arrive early.
> 004 9/14/2014 Emailed updated early arrival
> 005 reminder to Bob.
> 273647
> 001 8/15/2014 Sally called about pet policy.
> 002 8/17/2014 Mailed pet policy to Sally at
> 003 both addresses.
> 
> I'd like to have a dictionary item WHOLE.LOG that returns the entire log for 
> a given customer so I can do something like:
> 
> LIST CUSTOMER "123456" WHOLE.LOG
> 
> and get back something like:
> 
> customerID . . .     Whole Log . . . . . . . .
> 123456               9/12/2014 Spoke with Bob on the phone.
>                      Confirmed date of departure.  Reminded
>                      Bob to arrive early.
>                      9/14/2014 Emailed updated early arrival
>                      reminder to Bob.
> 
> 
> Thanks again for looking!
> 
> 
> 
> On Monday, October 13, 2014 5:33:39 PM UTC-4, [email protected] wrote:
> Hello,
> 
> Hoping someone can help.  I'm trying to define a dictionary item that will 
> retrieve an entire record, not just a specific field from the record or 
> multivalue from the field.  Is this possible without using a subroutine?
> 
> 
> 
> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to [email protected]
> To unsubscribe, send email to [email protected]
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to