Focal Point
ALPHA file format in WebFocus 7

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

September 25, 2006, 09:26 PM
focusqueen
ALPHA file format in WebFocus 7
I have a program that selects student ID numbers and then holds the list as an ALPHA output file. The students are selected using SQL within my .fex file. When I look at the output file, there appears to be the length of the field displayed first and then the id number on each line. How do I get rid of the length that is showing? I didn't have this problem in our previous version of WebFocus.
September 25, 2006, 09:34 PM
Piipster
I would expect that the numbers are AnV format ... variable length. You'll have to look at the settings available for your relational adapter to control how variable length fields are dealt with.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
September 26, 2006, 08:06 AM
Tony A
focusqueen,

Several ways you can do it. I'll use a ficticious column "student_number" as an example -

Method 1
SQL SQLMSS SET VARCHAR OFF

Method 2
SQL
SELECT CAST(student_number AS CHAR(12)) AS student_num
;

Method 3
TABLE FILE SQLOUT
PRINT student_number/A12
ON TABLE SAVE AS whatever
END


Hope this helps

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
September 26, 2006, 08:10 AM
Tony A
Whoops, missed at least one Wink -

SQL
SELECT CONVERT(VARCHAR(12), CHAR(12), student_number) AS student_num
;

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
September 26, 2006, 09:16 AM
focusqueen
You guys are awesome. The select cast(student_number as char(12)) as student_num worked great. Thank you so much!!!
September 26, 2006, 09:34 AM
Tony A
You are most welcome.

I suppose the advantage of the chosen resolution is that, should WF revert to forcing non-varchar then the CAST will not fail whereas the COVNERT may have done so. That and the fact that you are only applying the conversion to one actual column.

T