Focal Point
read multiple columns

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

September 26, 2007, 04:22 PM
MacLonghorn
read multiple columns
i'm working on using -READ to get the columns from a query that returns 1 record. i've got:

-READ MYFILE &COL1.I4. &COL2.A50. &COL3.A50.

It seems to be concatenating the first couple cols. First col is an integer, the other two are A50. I know I'm close, but I'm not experienced with the READ statement.


Thanks.

Mark
WF 7.6 Windows
September 26, 2007, 04:38 PM
MacLonghorn
just to clarify, i'm able to get this working it seems, but the A50 cols are right padded...very annoying.


Thanks.

Mark
WF 7.6 Windows
September 26, 2007, 05:05 PM
TexasStingray
Use HOLD/SAVE FORMAT ALPHA and read everything as .Axx.




Scott

just to clear up something - when you are doing a DM -READ, it does not know reading an integer from reading and alpha. It's just reading a flat file which must ALWAYS conform to a fixed layout. Best solution as Texas says, is to read everything as alpha. If the value is '1234', wherever you're using the &COL1 variable, it's
going to put 1234 regardles of whether you call it a number or a variable. if you need it in some specific format, say a date, for later calculations, you can use additional DM commands with functions to set it correctly. Same with alpha to integer (or floating)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
It is also wise to make sure that your hold file contains what you think it does. Use ?FF MYFILE to get the file description. If you did computes in the fex to create the hold file, the fields in the computes are also written to the file. To prevent this use SET HOLDLIST = PRINTONLY.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
ok, thanks everyone for your responses.


Thanks.

Mark
WF 7.6 Windows