The "each field on different line", or "vertical format", happens automatically when there are two many fields to fit in the current device width (e.g. 80 or 132).
The "splitting onto multiple lines", or "wrap", occurs because the data are too wide for the field width defined in the file dictionary. Show us the file dictionary listing. Or perhaps because the data themselves contain line feeds or dynamic array delimiters.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
But even when I do that still the truncation/folding occurs [There is no other option allowed ie. to allow for continous display of the row]
Right now I see that the select query is able to display only 70 characters (approx). It doesn't matter increasing the width as it anyway gets folded due to the limit on the display.
Is there a way that I could set this width to maximum? or FORCE for no truncation/folding by any other means
I would be glad if someone could guide me on this. I have been battering here and there for long time
If you were to use a "LIST" instead of a "SELECT" the previous advice would have helped and you would get more assistance on any other errors. What does "LIST HashOther" or "LIST DICT HashOther" produce?
ArndW wrote:If you were to use a "LIST" instead of a "SELECT" the previous advice would have helped and you would get more assistance on any other errors. What does "LIST HashOther" or "LIST DICT HashOther" produce?
I had both LIST and SELECT above... I am repeating them again over here...
I did try to increase the width, but looks like issue is that the terminal is only able to display approx 75 characters.
Will PTERM or UVOUT help by any means. I am looking into it. But not sure if I could find any.
Last edited by mystuff on Thu May 28, 2009 10:05 am, edited 1 time in total.
The total of field widths plus separator space must be less than your device width. Five at 40 equals 200, which is way too many, so you get vertical format. Try this:
In this query the total of field widths is less than 80, so should come out in horizontal format, one record per line. Please post the result of this query.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Field1...... Field2......... Field3.............. Field4.... Field5....
-4927275313 Not Applicable 2008-05-06 09:06:40 Test1 0
-4829300379 Not Applicable 2008-03-25 07:38:49 Test2 0
-4813747248 Not Applicable 2008-03-17 10:51:17 Test3 0
-4702305701 Not Applicable 2008-01-30 13:14:42 Test4 0
-4697551951 Not Applicable 2008-01-28 11:59:47 Test5 0
-4672229048 Not Applicable 2008-01-16 06:56:35 Test6 0
-4662878666 Not Applicable 2008-01-11 08:34:17 Test7 0
-4662809597 Not Applicable 2008-01-11 08:07:52 Test8 - ab 0
cdefghijkl
mnopqrstuv
Thanks for the feedback. Over here as you see here is the 8th records gets split although in List Dict its defined as 40 chars(obviously).
As I want this to be generic and should support hashed files which could probably have any plenty of columns with different lengths (worst case scenario lengths replica of a table with largest number of columns/lengths)
>set.term.type width 1000
DEC vt100 terminal (vt100)
>select * from HashOther;
Field1.................................. Field2.................................. Field3.................................. Field4.................................. Field5..................................
-4927275313 Not Applicable 2008-05-06 09:06:40 Test1 0
-4829300379 Not Applicable 2008-03-25 07:38:49 Test2 0
-4813747248 Not Applicable 2008-03-17 10:51:17 Test3 0
-4702305701 Not Applicable 2008-01-30 13:14:42 Test4 0
-4697551951 Not Applicable 2008-01-28 11:59:47 Test5 0
-4672229048 Not Applicable 2008-01-16 06:56:35 Test6 0
-4662878666 Not Applicable 2008-01-11 08:34:17 Test7 0
-4662809597 Not Applicable 2008-01-11 08:07:52 Test8 - abcdefghijklmnopqrstuv 0
To eliminate the spaces, I thought, lets get column names from LIST.DICT, use them in sql query along with TRIM function, but the column names gets split (irrespective of how large the SET.TERM.TYPE WIDTH xxxx).
Last edited by mystuff on Thu May 28, 2009 10:05 am, edited 1 time in total.
SETPTR 4,1000,20000,0,0,3,BANNER MyOutput,BRIEF
SELECT * FROM HashOther LPTR 4;
This directs output from the query to "printer channel 4" which is configured by the earlier SETPTR command. The BANNER option names the output file, which is in the &HOLD& subdirectory in your project and can therefore be read with any utility/program that you wish.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.