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.
Bonjour 2 Ways for a start : 1) COMASTER is (at least, was) a Focus delivered Master that describe Master File description : Some kind of reentrancy ... 2)CHECK FILE PICT HOLD puts a description of the Master (If correct) in a HOLD FILE When I was young and beautiful, ( Field Names were 12 car max in those famous days ) I wrote :
-DEFAULTS &ALPHA = N
-* SET &LGNOMCHAMP = IF &&RELEASE LT 680 THEN 12 ELSE 66 ;
-SET &LGNOMCHAMP = 66 ;
CHECK FILE &MASTER PICT HOLD
-*
-*******
-P10
-*******
DEFINE FILE HOLD
WNOCHAMP/I4 WITH FIELDNAME = IF SEGNAME NE LAST SEGNAME THEN 1
ELSE 1 + LAST WNOCHAMP;
W_FIELDN/A12 = SUBSTR(&LGNOMCHAMP,FIELDNAME,1,12,12,W_FIELDN) ;
W_ALIASN/A12 = SUBSTR(&LGNOMCHAMP,ALIAS ,1,12,12,W_ALIASN) ;
REDEF/A1 = IF WNOCHAMP EQ 1 THEN '0'
ELSE IF OFFSET EQ LAST OFFSET THEN '1'
ELSE '0';
RGLONGUEUR/I6C = LAST XTLEN;
POSDEP/I6C = IF WNOCHAMP EQ 1 THEN 1
ELSE IF REDEF EQ '0' THEN (RGLONGUEUR + LAST POSDEP)
ELSE (LAST POSDEP);
POSFIN/I6C = XTLEN - 1 + POSDEP;
END
-*
TABLE FILE HOLD
BY SEGNO NOPRINT
BY POSDEP NOPRINT
PRINT W_FIELDN AS 'NOM DU,CHAMP'
W_ALIASN AS 'ALIAS'
USAGE AS 'FORMAT,USAGE'
ACTUAL AS 'FORMAT,REEL'
DEC AS 'DONT,DEC.'
POSDEP AS 'POSIT,DEPART'
POSFIN AS 'POSIT, FIN '
-* FLEN AS 'LNG'
XTLEN AS 'LNG'
ON SEGNO SUBHEAD
" "
" ** SEGMENT <SEGNO>- <SEGNAME> ** (DEBUT)"
ON SEGNO SUBFOOT
" ** SEGMENT <SEGNO>- <SEGNAME> ** (FIN )"
HEADING
" THIS PAGE WAS LEFT BLANK INTENTIONALY "
END
-RUN
-IF &ALPHA NE 'O' THEN GOTO SORTIE;
-*******
-P20
-*******
TABLE FILE HOLD
BY W_FIELDN AS 'NOM DU,CHAMP'
PRINT W_ALIASN AS 'ALIAS'
USAGE AS 'FORMAT,USAGE'
ACTUAL AS 'FORMAT,REEL'
DEC AS 'DONT,DEC.'
POSDEP AS 'POSIT,DEPART'
POSFIN AS 'POSIT, FIN '
-* FLEN AS 'LNG'
XTLEN AS 'LNG'
HEADING
" THIS PAGE WAS LEFT BLANK INTENTIONALY "
END
-*******
-SORTIE
-*******
Don't think I'll reach the Summit with that ... Cordially and Focusely
Focus Mainframe 7.6.11 Dev Studio 7.6.11 and !!! PC Focus, Focus for OS/2, FFW Six, MSO
Merci beaucoup Baillecl. Your logic looks great, but im looking for a simpler solution.
As i dont have much experience with Master file, i wanted to know if there is an option in Synonym editor to alphabetically sort the fields within a segment, so that when i open the master with GUI, the fields would appear sorted.
WF 7.7.02 on Windows 7 Teradata HTML,PDF,EXCEL,AHTML
Sorry, no such thing. If you want this, then keep two things in mind: 1. you'll have to manually sort the fieldlist per segment. When the master file is re-genned, you'll have to do it all over again. 2. keep the key-field(s) always as the first field(s) in the segment. Isn't there an option in DevStudio that allows you to show the available fields in alfabetical order in the object inspector?
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Isn't there an option in DevStudio that allows you to show the available fields in alfabetical order in the object inspector?
Yes, there is. And also in the synonym editor it is possible to show an alphabetical list of fields. But when you select that possibility there is no segment information any more.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Thanks Gamp for your input. It ends up as a manual process, i can copy the code over to excel and arrange the field order. As you pointed out, i want the key-fields as the first and the rested sorted.
Also, the users would use this master with InfoAssist, so if the fields are sorted it would be easier for navigation.
WF 7.7.02 on Windows 7 Teradata HTML,PDF,EXCEL,AHTML