June 13, 2007, 09:45 AM
SujiTexasStingray,
What I want to know is that is there any simple method to compare two set of inputs in Webocus and is there any way to retain the values of last set of inputs in a standalone report?
June 13, 2007, 11:28 AM
hammo1jMethod A.
1. filedef an output thats not in edatemp directory eg C:\ibi\apps\appname.
2. -WRITE the amper variables on one run and then -READ them in the next run and compare the values.
Method B.
1. Set persistent global variables on in the Webfocus admin console. (Stored as cookie in user session)
2. &&SAVE_X = &X ; -* Stores setting in global
-IF &X EQ &&SAVE_X THEN ... -* tests if they changed.
June 13, 2007, 11:32 AM
dwfAssuming we are talking WebFOCUS here, and not mainframe FOCUS, when your request completes, your variable values are gone. YOu could write the values of the variables to a file, then read that file in the next request. You'll have to tell WebFOCUS where to find the file in each case.
There are a number of ways to do identify file location. I don't like the old fashioned filedef myself. I prefer APP FILEDEF.
APP FILEDEF PARMFILE DISK MYFOLDER/PARMFILE.DAT
You'll reference PARMFILE in your reads and writes. The filedef above tells WebFOCUS that this is the file PARMFILE.DAT, located in the MYFOLDER application directory.
Issue that command at the top of each of your programs. If the first program (after the filedef), you'll want something like:
-WRITE PARMFILE &VAR1 &VAR2
In the second program (after the filedef):
-READ PARMFILE &VAR1.A3. &VAR2.A10.
A3 and A10 indicate formats. If you cannot predict the lengths of the variables, you'll want to use a freeform -READ.
APP FILEDEF, -READ and -WRITE are documented in the Developing Applications manual.
This will take a while for you to figure out. Just do what we all do: Keep trying different things until something works!
BY the way, if you use a .FEX extension for your parm file, instead of .DAT, you can tell use developer studio to read/edit it. It's a little weird to put data in a fex, but it's useful.
-
June 13, 2007, 11:36 AM
KerryHi Suji,
You can use MATCH FILE to compare the two HOLD FILES here in a section of the doc. This is the merge phrase you will most likely need:
OLD‑NOR‑NEW specifies that only records that are in the old data source but not in the new data source, or in the new data source but not in the old, appear in the HOLD file (the complete set of non‑matching records from both data sources).
The way MATCH merges data depends on the order in which you name data sources in the request, the BY fields, display commands, and the merge phrases you use. In general, however, processing is as follows:
1. MATCH retrieves requested records from the first data source you name, and writes them to a temporary work area.
2. MATCH retrieves requested records from the second data source you name, and writes them to a temporary work area.
3. It compares the retrieved records' common high‑order sort fields as specified in the merge phrase (for example, OLD‑OR‑NEW). For more information, see Merge Phrases.
4. It writes the merged results of the comparison to a temporary data source (if there are more MATCH operations). It cycles through all data sources named until END is encountered.
5. It writes final records to the HOLD file.
Syntax: How to Specify Merge PhrasesAFTER MATCH HOLD [AS 'name'] mergetype where:
AS 'name' Specifies the name of the extract data source created by the MATCH command. The default is HOLD.
mergetype Specifies how the retrieved records from the files are to be compared.
The results of each phrase are graphically represented using Venn diagrams. In the diagrams, the left circle represents the old data source, the right circle represents the new data source, and the shaded areas represent the data that is written to the HOLD file.
OLD‑OR‑NEW specifies that all records from both the old data source and the new data source appear in the HOLD file. This is the default if the AFTER MATCH line is omitted.
OLD‑AND‑NEW specifies that records that appear in both the old and new data sources appear in the HOLD file. (The intersection of the sets.)
OLD‑NOT‑NEW specifies that records that appear only in the old data source appear in the HOLD file.
NEW‑NOT‑OLD specifies that records that appear only in the new data source appear in the HOLD file.
OLD‑NOR‑NEW specifies that only records that are in the old data source but not in the new data source, or in the new data source but not in the old, appear in the HOLD file (the complete set of non‑matching records from both data sources).
OLD specifies that all records from the old data source, and any matching records from the new data source, are merged into the HOLD file.
NEW specifies that all records from the new data source, and any matching records from the old data source, are merged into the HOLD file.
For more information, you may want to check any of the reporting manual, looking for MATCH FILE and also Merge phrases.
Hope this helps.
Cheers,
Kerry