dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
I have coded a program based on a redbook named:<< DB2 for z/OS and OS/390 : Squeezing the Most Out of Dynamic SQL>>@ www.redbooks.ibm.com/abstracts/sg246418.htmlf,
I'm using VARYING-LIST SELECT WITHOUT PARMS
but viewing from the result, I found a problem: columns defined as INTEGER, BIGINT, SMALLINT and ect cannot be displayed normally just as QMF and SPUFI does.
for example, below is what dynamic SQL result shows:
Code: |
BROWSE TMAP011.SQL.OUTPUT@
********************************* Top of Data
00000000000000001..11111111111111111000001
1 ..1 1 1
11111111111111111..11 1111
1234567 ..1 1 1
12 ..1 3 1
13 ..1 1 1 |
and below is the SPUFI result:
Code: |
BROWSE TMAP011.SPUFI.OUT
----+----1----+----2----+----3----+----4----+----5
********************************* Top of Data ****
---------+---------+---------+---------+---------+
SELECT * FROM SCNXTAB.SDKMAST
---------+---------+---------+---------+---------+
BSAC BSAC_SEQNO PDAC
---------+---------+---------+---------+---------+
00000000000000001 1 11111111111111111
1 1 1
11111111111111111 11 11
1234567 1 1
12 1 1
13 1 1
11111111111111112 0 1111
11111111111111113 1 1
22 2 2
2 1 1 |
in above results, we can see that column: BSAC_SEQNO, which is defined as SMALLINT, starting from column 18, can be displayed normally by SPUFI, while not good for dynamic SQL output(I know it's readable when 'HEX ON' command is issued.)
How to produce the same result as SPUFI does?
Would you please suggest how to resolve this issue?
Thanks in advance.
note that as I'm using VARYING-LIST SELECT WITHOUT PARMS, column numbers and types are not predictable by cobol program , thus we cannot declare variables for columns in WORKING-STORAGE section. |
|