APPX is the Premier Development and Runtime Environment for Business Application Software
(Answer) (Category) FAQ's - APPX Software, Inc. : (Category) APPX Utility : (Category) APPX Development Environment : (Category) Tips & Techniques :
How to QUERY/INPUT via Cache!
When you want a QUERY to constrain an INPUT process (the regular INPUT Child 
Constraints can't be satisfied using CC's 'EQ' comparison operator only), you 
can use the following technique:

Create a JOB with Job Steps:
    QUERY
    UPDATE   (uq=query)
    INPUT

All three processes use the same PCF.

The UPDATE's Start of Process is:

      SCRATCH  AAA FILENAME              CACHE? Y
      CREATE   AAA FILENAME   SHARE? Y   CACHE? NOLOAD
      OPEN     AAA FILENAME   SHARE? Y   CACHE? N

The UPDATE's Record frame contains only:

      OPEN     AAA FILENAME   SHARE? Y   CACHE? Y
      WRITE    AAA FILENAME
      OPEN     AAA FILENAME   SHARE? Y   CACHE? N

The INPUT's JobStep's Pre-Invocation sets the following detached workfield:

      SET      AAA WORK USE-CACHED-PCF        =      1

The INPUT's Start of Process contains:

      IF       AAA WORK USE-CACHED-PCF        EQ     1
 T    OPEN     AAA FILENAME   SHARE? Y   CACHE? Y

The INPUT's Post-Invocation sets:

      SET      AAA WORK USE CACHED PCF        =      0

This example does not pass changes to the CACHEed version on to the disk 
version.  You'd have to put code in the INPUT's End of Process for that.
[Append to This Answer]
2004-Jan-02 11:22am
Previous: (Answer) How to get User Security Codes using ILF.
Next: (Answer) How to get the name of the Parent Process.
This document is: http://board.appx.com/cgi-bin/fom.cgi?file=257
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
Copyright 2003 by APPX Software, Inc. All rights reserved.