Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [WAZed] Has anyone ever -SET a variable with the field format from a master file?
Go
New
Search
Notify
Tools
Reply
  
[WAZed] Has anyone ever -SET a variable with the field format from a master file?
 Login/Join
 
Guru
posted
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,


Senior Business Intelligence Analyst (BIA) @ Enclara Pharmacia
Production: WF 8.09, App Studio, BIP, RC, MSSQL / Test: WF 8202M, App Studio, BIP, RC, MSSQL
 
Posts: 285 | Location: Greater Cincinnati  | Registered: May 11, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Perhaps use SYSCOLUM to get the format of the field ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.01OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 5917 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Guru
posted Hide Post
Yep

 TABLE FILE SYSCOLUM
PRINT COLTYPE LENGTH
WHERE TBNAME EQ 'CAR'
WHERE NAME EQ 'MODEL'
-*ON TABLE SAVE
END
-RUN 


Thank you,


Senior Business Intelligence Analyst (BIA) @ Enclara Pharmacia
Production: WF 8.09, App Studio, BIP, RC, MSSQL / Test: WF 8202M, App Studio, BIP, RC, MSSQL
 
Posts: 285 | Location: Greater Cincinnati  | Registered: May 11, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
[WAZed]


You have made my day.

Big Grin


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.01OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 5917 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Don,
You don't need the format:
  
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

 
Posts: 1890 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [WAZed] Has anyone ever -SET a variable with the field format from a master file?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.