[WAZed] Has anyone ever -SET a variable with the field format from a master file?
Scenario:
I need to append two files, one with detail information and the other with a summary of the detail. I've done this many time using MORE.
The problem I'm having is, the BY FIELD of the summary file variable. I don't know what field the user will select as the BY FIELD and that format must match for the MORE to work.
Here is an example, I need to find a way to set the &FMT variable based on the BY FIELD the user selects.
Any ideas?
TABLE FILE CAR
SUM
SALES
ON TABLE HOLD AS HOLD1
END
-RUN
DEFINE FILE HOLD1
MODEL/&FMT = 'ALL';
END
TABLE FILE HOLD1
PRINT
SALES
BY MODEL
ON TABLE HOLD AS HOLD2
END
TABLE FILE CAR
SUM
SALES
BY MODEL
ON TABLE HOLD AS HOLD3
MORE
FILE HOLD2
END
TABLE FILE HOLD3
PRINT *
END
This message has been edited. Last edited by: Don Garland,
TABLE FILE CAR
SUM
SALES
BY MODEL
ON TABLE HOLD AS HOLD1
END
DEFINE FILE HOLD1
MODEL=' ALL'
END
TABLE FILE HOLD1
SUM SALES
BY MODEL
ON TABLE HOLD AS HOLD2
END
DEFINE FILE HOLD1 CLEAR
END
TABLE FILE HOLD1
SUM SALES BY MODEL
ON TABLE HOLD AS HOLD3
MORE
FILE HOLD2
END
TABLE FILE HOLD3
SUM SALES
BY MODEL
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF