Focal Point
[SOLVED] Simple TABLE FILE example w/ datetime and text fields

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

June 26, 2015, 12:03 PM
DarrenDobkin
[SOLVED] Simple TABLE FILE example w/ datetime and text fields
Hi, I'm just trying to get past the "Hello, World" stage with the TABLE FILE command. I have a 17-row data source with a datetime column and a text column. The vw_dailyacrslog.mas master file looks like this:

  
     FILENAME=VW_DAILYACRSLOG, SUFFIX=SQLMSS  , $
	  SEGMENT=VW_DAILYACRSLOG, SEGTYPE=S0, $
		FIELDNAME=ERRORDATETIME, ALIAS=ErrorDateTime, USAGE=HYYMDs, ACTUAL=HYYMDs,
		  MISSING=ON, $
		FIELDNAME=ERRORPROCSTEP, ALIAS=ErrorProcStep, USAGE=TX50, ACTUAL=TX,
		  MISSING=ON, $
		FIELDNAME=ERRORMESSAGE, ALIAS=ErrorMessage, USAGE=TX50, ACTUAL=TX,
		  MISSING=ON, $


The following report displays the 17 datetime values just fine:

  
	TABLE FILE VW_DAILYACRSLOG
	PRINT 
		 VW_DAILYACRSLOG.VW_DAILYACRSLOG.ERRORDATETIME
	-*     VW_DAILYACRSLOG.VW_DAILYACRSLOG.ERRORPROCSTEP
	ON TABLE HOLD AS daily1 FORMAT ALPHA
	END

	TABLE FILE daily1
	PRINT *
	END


If I remove the datetime field and uncomment the ERRORPROCSTEP text field, I get no errors but I only get the value for one row.

If I uncomment both lines to include both the datetime and text columns, I get:

  
	(FOC702) THE OPTION SPECIFIED IS NOT AVAILABLE WITH TEXT FIELDS: ERRORPROCSTEP


Can anyone offer a clue as to why I cannot display all the text values or display both the datetime and text columns together?

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8
Windows, All Outputs
June 26, 2015, 01:35 PM
DarrenDobkin
OK, managed to answer my own question. Using FOCUS format and keeping the field names <= 12 characters works:

	TABLE FILE VW_DAILYACRSLOG
	PRINT 
		VW_DAILYACRSLOG.VW_DAILYACRSLOG.ERRORDATETIME AS ErrDateTime
		VW_DAILYACRSLOG.VW_DAILYACRSLOG.ERRORPROCSTEP AS ErrProcStep
	ON TABLE HOLD AS daily1 FORMAT FOCUS
	END

	TABLE FILE daily1
	PRINT *
	END



WebFOCUS 8
Windows, All Outputs