The documentation states: FLIP Propagates the field names in the original Master File to the alias names in the HOLD Master File and the alias names in the original Master File to the field names in the HOLD Master File.
So, I tried using CAR FIELDNAME=COUNTRY,COUNTRY,A10,FIELDTYPE=I,$ ... FIELDNAME=SALES,UNITS,I6,$
SET ASNAMES=FLIP
TABLE FILE CAR
PRINT COUNTRY
SALES
ON TABLE HOLD
END
in section : Example: Generating a HOLD File With SET ASNAMES=FLIP
Changing SET ASNAMES to FLIP propagates the AS name SALARY to the alias name in the HOLD Master File. In the ALPHA HOLD file, the other field names have been propagated to the alias names in the HOLD Master File, and default field names have been generated:
FILENAME=HOLD , SUFFIX=FIX , IOTYPE=STREAM, $
SEGMENT=HOLD, SEGTYPE=S1, $
FIELDNAME=F01, ALIAS=DEPARTMENT, USAGE=A10, ACTUAL=A10, $
FIELDNAME=F02, ALIAS=SALARY, USAGE=D12.2M, ACTUAL=A12, $
FIELDNAME=F03, ALIAS=PCT_INC, USAGE=F6.2, ACTUAL=A06, $
the HOLD Master File, and default field names have been generated
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
June 22, 2017, 09:47 AM
Danny-SRL
Martin,
Hence one should not stop at the definition but look for details... What can I say? Isn't this misleading?
Definition ASNAMES=FLIP Propagates the field names in the original Master File to the alias names in the HOLD Master File and the alias names in the original Master File to the field names in the HOLD Master File. This seems straightforward enough, wouldn't you say?
Then an example: When you set the ASNAMES parameter to FLIP, for relational HOLD files, the field names from the original Master File or the AS names specified in the request become the alias names in the HOLD Master File as well as the column names in the generated relational table and the TITLE attributes in the HOLD Master File. The alias names in the original Master File become the field names in the HOLD Master File, except when there is an AS name, in which case the original field name becomes the HOLD field name.
And suddenly an exception: For SET ASNAMES=FLIP, for non-relational HOLD files, the field names from the original Master File or the AS names from the request become the alias names in the HOLD Master File, and default field names are generated in the form F01, F02, and so on.
Why, oh why? What is the rationale?
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
June 22, 2017, 10:04 AM
MartinY
I'm speechless... Isn't it one of the great Focus mysteries ?...
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
June 22, 2017, 05:16 PM
Waz
quote:
Why, oh why? What is the rationale?
My guess is that one (high paying) customer requested it for some reason.
And to be honest, having all the field names changes to Fnn could be useful in some circumstances.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
June 23, 2017, 02:35 AM
Danny-SRL
quote:
having all the field names changes to Fnn could be useful in some circumstances
In that case why not having FLIP and FLIPF, and let the user decide?
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
June 26, 2017, 01:55 PM
FP Mod Chuck
Danny
This is just an observation if you just have SET ASNAMES=ON the FIELDNAME in the hold file master is the name used in the AS but the ALIAS fields are name E01, E02 etc so not sure why it uses F01 (maybe for Flip) but it is consistent with how the product has always worked.
Regards
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
June 27, 2017, 08:39 AM
Danny-SRL
Chuck, Way back then, when SET ASNAMES did not exist, one needed the Enn fields when the request used ACROSS (or a multi-set request) to distinguish between columns holding data from the same field. When SET ASNAMES=ON came along, the Enn fields stayed, by inertia. Now that we have this new feature SET ASNAMES=FLIP, the Fnn is quite unnecessary. At least give the user the choice, wouldn't you say?
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
June 27, 2017, 10:51 AM
FP Mod Chuck
Hi Danny
Yes I would agree with you. Can you please submit a new feature request via techsupport for it to happen.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats