Focal Point
[Share] SET HOLDLIST=PRINTONLY, ASNAMES=ON and DST. - a side effect

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

May 17, 2017, 01:34 PM
Danny-SRL
[Share] SET HOLDLIST=PRINTONLY, ASNAMES=ON and DST. - a side effect
An interesting bug(?) feature(?).
See the following:
 
 SET ASNAMES=OFF
 SET HOLDLIST=ALL
 TABLE FILE CAR
 PRINT DST.MPG
 ON TABLE HOLD AS TMPOBD
 END
 ?FF TMPOBD

 FILENAME=  TMPOBD
 MPG           E01           D6
 MPG           E02           D6
 
SET ASNAMES=OFF
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
PRINT DST.MPG
ON TABLE HOLD AS TMPOBD
END
?FF TMPOBD

FILENAME=  TMPOBD
MPG           E01           D6


 SET ASNAMES=ON
 SET HOLDLIST=ALL
 TABLE FILE CAR
 PRINT DST.MPG
 ON TABLE HOLD AS TMPOBD
 END
 ?FF TMPOBD

 FILENAME=  TMPOBD
 DISTINCT      E01           D6
 MPG           E02           D6


SET ASNAMES=ON
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
PRINT DST.MPG
ON TABLE HOLD AS TMPOBD
END
?FF TMPOBD

FILENAME=  TMPOBD
DISTINCT      E01           D6


Say that you want to get all the distinct values of MPG in order to JOIN them to some other file.
If you are not aware that ASNAMES=ON and HOLDLIST=PRINTONLY (they are set in EDASPROF for example), your JOIN is going to cause an error: MPG unknown in file TMPOBD.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

May 18, 2017, 05:14 AM
Dave
SET ASNAMES = ON
SET HOLDLIST = PRINTONLY
TABLE FILE CAR
	SUM DST.MPG AS 'MPG'
ON TABLE HOLD AS TMPOBD
END
?FF TMPOBD


?


_____________________
WF: 8.0.0.9 > going 8.2.0.5
May 22, 2017, 02:53 AM
Danny-SRL
Dave,

Of course with the AS clause MPG will be the fieldname.

At a customer site there was
  
TABLE FILE CAR
	PRINT DST.MPG 
ON TABLE HOLD AS TMPOBD
END

after which a JOIN using MPG.
All this worked well until somebody put
SET HOLDLIST=PRINTONLY in EDASPROF.

To be free of side effects, I usually code the SET parameters in the TABLE request.

Cave focum!


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

May 22, 2017, 03:23 AM
Dave
Oh yeah,

I misread your post. I though it was more of a : "look what happend!".

I thought is was an easy fix.



...and yes. This happens. But that goes for all settings in EDASPROF.


_____________________
WF: 8.0.0.9 > going 8.2.0.5