Focal Point
[SOLVED] Viewing Master File Description

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6117057196

October 01, 2019, 10:48 AM
jltz83od
[SOLVED] Viewing Master File Description
Is there a simple command (like ?FF) that outputs the description of the master file, including field names, aliases, formats, etc.?

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


WebFOCUS 8.2.06, Windows
October 01, 2019, 11:54 AM
FP Mod Chuck
jitz83od

?FF car does exactly what you are asking for, field name, alias and format


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 01, 2019, 04:55 PM
Waz
Also SYSTABLE and SYSCOLUM can show the masters table level info and column level info.


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!

October 10, 2019, 09:55 AM
jltz83od
Ok. I was also wanting to look at information about the table suffix and indexes in a format similar to the way we often see master file descriptions displayed. I guess I can also TABLE the results of CHECK FILE to retrieve this information.

I am curious, though, if there is a command that returns the information to display like this:

FILENAME=EMPDATA, SUFFIX=FOC, MFD_PROFILE=baseapp/DDBAEMP,$
VARIABLE NAME = Emptitle, USAGE=A30, DEFAULT=EMPID,$
SEGMENT=EMPDATA,SEGTYPE=S0, $
FIELDNAME=PIN , ALIAS=ID, USAGE=A9, INDEX=I, TITLE='&&Emptitle',$
FIELDNAME=LASTNAME, ALIAS=LN, FORMAT=A15, $
FIELDNAME=FIRSTNAME, ALIAS=FN, FORMAT=A10, $
FIELDNAME=MIDINITIAL, ALIAS=MI, FORMAT=A1, $
FIELDNAME=DIV, ALIAS=CDIV, FORMAT=A4, $
FIELDNAME=DEPT, ALIAS=CDEPT, FORMAT=A20, $
FIELDNAME=JOBCLASS, ALIAS=CJCLAS, FORMAT=A8, $
FIELDNAME=TITLE, ALIAS=CFUNC, FORMAT=A20, $
FIELDNAME=SALARY, ALIAS=CSAL, FORMAT=D12.2M, $
FIELDNAME=HIREDATE, ALIAS=HDAT, FORMAT=YMD, $


WebFOCUS 8.2.06, Windows
October 10, 2019, 11:29 AM
FP Mod Chuck
There is no command that does that but you can create a report using SYSCOLUM as the source and replicate this look.

Is this for your users to see the contents or what is the requirement to view it like this?


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 10, 2019, 12:51 PM
David Briars
I would open the master in the text editor, to view its contents.

Just for curiosity...
-DEFAULTH &LINEREAD ='DUMMY'
-* Assign Car Master to a logical fileaname.  
FILEDEF TESTME DISK IBISAMP/EMPDATA.MAS (LRECL 70
-RUN
-* Read through the file and print each line.  
-REPEAT ENDOFLOOP 200 TIMES
-READ TESTME &LINEREAD.A70.
-IF &IORETURN NE 0 GOTO ENDOFREAD;
-TYPE &LINEREAD
-ENDOFLOOP
-*
-ENDOFREAD  

...gives...
 FILENAME=EMPDATA, SUFFIX=FOC
 SEGNAME=EMPDATA,  SEGTYPE=S1
 FIELDNAME=PIN,          ALIAS=ID,       FORMAT=A9,  INDEX=I,    $
 FIELDNAME=LASTNAME,     ALIAS=LN,       FORMAT=A15,             $
 FIELDNAME=FIRSTNAME,    ALIAS=FN,       FORMAT=A10,             $
 FIELDNAME=MIDINITIAL,   ALIAS=MI,       FORMAT=A1,              $
 FIELDNAME=DIV,          ALIAS=CDIV,     FORMAT=A4,              $
 FIELDNAME=DEPT,         ALIAS=CDEPT,    FORMAT=A20,             $
 FIELDNAME=JOBCLASS,     ALIAS=CJCLAS,   FORMAT=A8,              $
 FIELDNAME=TITLE,        ALIAS=CFUNC,    FORMAT=A20,             $
 FIELDNAME=SALARY,       ALIAS=CSAL,     FORMAT=D12.2M,          $
 FIELDNAME=HIREDATE,     ALIAS=HDAT,     FORMAT=YMD,             $
 $
 DEFINE AREA/A13=DECODE DIV (NE 'NORTH EASTERN' SE 'SOUTH EASTERN'
 CE 'CENTRAL' WE 'WESTERN' CORP 'CORPORATE' ELSE 'INVALID AREA');$   





Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
October 10, 2019, 12:55 PM
FP Mod Chuck
Good One Very clever!


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 10, 2019, 02:34 PM
jltz83od
Agreed. Very clever, David! Thank you!

Chuck, there isn't a need for users to see things this way per se. We are currently migrating some of our programs from FOCUS for AS400 to WebFOCUS, and this is the way master file descriptions are displayed in the old system. It's just for ease of comparison between the two platforms and to help us learn how things work together and are different as we make the transition.

Thanks for your help!


WebFOCUS 8.2.06, Windows
October 11, 2019, 10:16 AM
Pete Conlin
You may need to substitute filedef & alter the size of line, depending on your environment/coding technique.
This approach is from a method to extract filedef'd configuration files on a server, such as edaserve, etc.

This message has been edited. Last edited by: Pete Conlin,


3.x-8.x,z/OS