Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Process to parse a Masterfile

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Process to parse a Masterfile
 Login/Join
 
Member
posted
Does anyone have a process written to parse a masterfile to extract field names, descriptions, defined fields, and filters?

This message has been edited. Last edited by: FP Mod Chuck,


All WebFOCUS Releases
 
Posts: 4 | Registered: November 14, 2012Report This Post
Expert
posted Hide Post
Umm, SYSTABLE and SYSCOLUM will help, as they read the masters and access files.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Roger

This is some code that Marcy Miller created to expose the metadata into a hold file and use for different functions with her 'Fasttrack' application. It is pretty complex and probably isn't exactly what you need but you will see how to get the info you are wanting.


-* File Extend Metadata
-SET &FOLDERPATH='fasttrack';
-RUN
TABLE FILE SYSAPPS
SUM FNAME
BY FNAME NOPRINT
WHERE FEXT EQ 'mas';
WHERE APPNAME CONTAINS '&FOLDERPATH.EVAL';
WHERE FDESCR NE '';
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS TBLIST
END

-* BUILD METADATA
DEFINE FILE SYSCOLUM
JOINKEY/A60=EDIT(TBNAME,'999999999999999999999999999999')||EDIT(NAME,'999999999999999999999999999999');
DSPLYLBL/A1000=STRREP (1000, TITLE, 1000, ',', 1, ' ', 1000, 'A1000');
NFILENAME/A100=IF FILENAME EQ '' THEN '' ELSE (FILENAME || '.');
NSEGNAME/A100=IF SEGNAME EQ '' THEN '' ELSE (SEGNAME || '.');
NEWNAME/A1000=IF DEFINE EQ 'C' THEN ('COMPUTE ' | NAME || ';') ELSE (NFILENAME || NSEGNAME || NAME);
GROUPSORT/A2=DECODE DEFINE ('Y' '2' 'C' '3' 'F' '4' ELSE '1');
GROUPING/A40=DECODE DEFINE ('Y' 'Virtual Row Calculations' 'C' 'Virtual Aggregation Calculations' 'F' 'Filters' ELSE 'Database Columns');
USAGE1/A1=EDIT(USAGE,'9');
USAGE2/I4=IF USAGE CONTAINS 'V' THEN EDIT(EDIT(GETTOK(USAGE, 200, 1, 'V', 200, 'A50'),'$99')) ELSE EDIT(EDIT(USAGE,'$99'));
GA_COLTYPE/A2=IF IS_CUBE EQ 'Y' AND DIMEN_NAME GT '' THEN 'D' ELSE
IF IS_CUBE EQ 'Y' AND PROPERTY EQ 'MEASURE' THEN 'M' ELSE
IF IS_CUBE EQ 'Y' AND PROPERTY EQ 'CAPTION' THEN 'D' ELSE
IF IS_CUBE EQ 'Y' AND PROPERTY EQ 'ATTRIBUTE' THEN 'D' ELSE
IF IS_CUBE EQ 'Y' AND PROPERTY EQ 'FILTER' THEN 'F' ELSE
IF IS_CUBE EQ 'Y' AND DEFINE EQ 'F' THEN 'F' ELSE
IF IS_CUBE EQ 'Y' AND DIMEN_NAME NE '' THEN 'D' ELSE
IF IS_CUBE EQ 'Y' THEN '' ELSE
IF DEFINE EQ 'F' OR BV_DEFINE EQ 'F' THEN 'F' ELSE
IF DEFINE EQ 'C' OR BV_DEFINE EQ 'C' THEN 'M' ELSE
IF DEFINE EQ 'Y' AND USAGE EQ 'YMD' OR 'YYMD' OR 'YYMDy' OR 'YYMDm' OR 'YYMDq' OR 'MtDYYm' OR 'W' OR 'WT' OR 'WR' OR 'Wt' OR 'Wr' OR 'Mt' OR 'wt' THEN 'D' ELSE
IF USAGE1 EQ 'A' THEN 'D' ELSE
IF USAGE1 EQ 'P' THEN 'M' ELSE
IF USAGE1 EQ 'D' THEN 'M' ELSE
IF USAGE1 EQ 'I' THEN 'M' ELSE
IF DEFINE EQ 'Y' AND USAGE1 EQ 'I' THEN 'M' ELSE
IF DEFINE EQ 'Y' AND USAGE1 EQ 'P' THEN 'M' ELSE
IF DEFINE EQ 'Y' AND USAGE1 EQ 'D' THEN 'M' ELSE
'';
END
TABLE FILE SYSCOLUM
SUM
USAGE
DEFTEXT
GA_COLTYPE
LONGDESC
BY JOINKEY
BY TBNAME
BY NAME
BY DSPLYLBL AS 'TITLE'
BY NEWNAME AS 'PASSED_COLUMN'
BY ALIAS
BY USAGE1 NOPRINT
WHERE ACCESS_PROP NE 'INTERNAL';
WHERE TBNAME EQ '&TBNAME';
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS METAHOLD1 FORMAT FOCUS INDEX JOINKEY
END

-* GET DEFAULT MEASURES
TABLE FILE METAHOLD1
LIST NAME
JOINKEY
BY TBNAME
WHERE GA_COLTYPE EQ 'M';

ON TABLE HOLD AS METAMEAS
END

TABLE FILE METAMEAS
SUM COMPUTE VARNAME/A20='MEASURE' || EDIT(LIST,'$$$$9');
BY JOINKEY
ON TABLE HOLD AS HOLDMEAS FORMAT ALPHA
END


-* GET DEFAULT DIMENSIONS
TABLE FILE METAHOLD1
LIST NAME
JOINKEY
BY TBNAME
WHERE (GA_COLTYPE NE 'DX' OR 'M' OR 'F')
ON TABLE HOLD AS METADIM
END

TABLE FILE METADIM
SUM COMPUTE VARNAME/A20='DIMENSION' || EDIT(LIST,'$$$$9');
BY JOINKEY
ON TABLE HOLD AS HOLDDIM FORMAT ALPHA
END

TABLE FILE HOLDMEAS
SUM VARNAME
BY JOINKEY
ON TABLE HOLD AS METAVARS FORMAT FOCUS INDEX JOINKEY
MORE
FILE HOLDDIM
END


JOIN JOINKEY IN METAHOLD1 TO UNIQUE JOINKEY IN METAVARS AS J1
TABLE FILE METAHOLD1
PRINT
USAGE
TITLE
PASSED_COLUMN
DEFTEXT
GA_COLTYPE
LONGDESC
VARNAME
BY TBNAME
BY NAME
WHERE TITLE NE ''
ON TABLE HOLD AS METAHOLD2
END
-RUN

TABLE FILE METAHOLD2
PRINT *
ON TABLE HOLD AS EXTMETADATA FORMAT ALPHA
END


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Member
posted Hide Post
Thank you for the insight Chuck. I'll make a pot of coffee and look this over !!!

Hope you are doing great.


All WebFOCUS Releases
 
Posts: 4 | Registered: November 14, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Process to parse a Masterfile

Copyright © 1996-2020 Information Builders