View previous topic :: View next topic
|
Author |
Message |
xylene567 Warnings : 1 New User
Joined: 11 Jun 2007 Posts: 12 Location: TVM
|
|
|
|
Hi,
I am getting a warning code of 4 and I find this message in the spool.
INPUT STATEMENT WAS NOT A FULL SELECT ON A SINGLE TABLE. LOAD STATEMENT WILL NEED MODIFICATION.
UNLOAD DATA SET SYSREC00 RECORD LENGTH SET TO 6
I get only ASCII characters in my output file.
My code is as follows.
//***************************************************************
//* DATABASE OUTPUT FILE
//***************************************************************
//STEP010 EXEC PGM=IKJEFT1A,DYNAMNBR=20
//STEPLIB DD DISP=SHR,DSN=SYS4.DB2.P2D2.SDSNEXIT
// DD DISP=SHR,DSN=SYS4.DB2.P2D2.SDSNLOAD
//*
//SYSREC00 DD DSN=AXXXXX.DEL010.OUTDD2,
//*SYSREC00 DD DSN=*.DEL010.OUTDD1,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(150,75),RLSE),
// UNIT=SYSDA
//*
//SYSPUNCH DD DUMMY
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
. DSN SYSTEM(P2D2)
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARM('SQL') -
LIB('SYS4.DB2.P2D2.RUNLIB.LOAD')
END
//*
//SYSIN DD *
SET CURRENT DEGREE = 'ANY';
SELECT A.AXX_ID_CHXXX
FROM D2XX.AXX_CHAIN_EOM_SHR A
,D2XXA.AXX_CHANL_REL B
WHERE A.AXX_ID_CXXX = B.AXX_ID_CXXX
FETCH FIRST 120 ROWS ONLY
;
// . . . . . . . . . . . . . . . . . . . . .
Can someone help me and tell me why I am getting only ascii characters in my output file? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Because the input is ASCII? |
|
Back to top |
|
|
xylene567 Warnings : 1 New User
Joined: 11 Jun 2007 Posts: 12 Location: TVM
|
|
|
|
Nope I checked the tables using DB2 Tools. The data can be viewed with no probs there |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What do you mean when you say
Quote: |
I am getting only ascii characters in my output file |
How did you verify your result returned only ascii values?
If you ran this on the mainframe, if is unlikely that the output was created with ascii.
Please open your output file in browse using HEX ON, and post a bit of the first few output records here. |
|
Back to top |
|
|
xylene567 Warnings : 1 New User
Joined: 11 Jun 2007 Posts: 12 Location: TVM
|
|
|
|
I got the output as
&<CCS
ë<CCS
Î CCS
the actual output has to be
504.
534.
760.
which are decimal numbers (11,0)
Is it the problem with some conversions? I am not sure if the output that I got is ASCII characters but then it doesnt look good ! |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
It could be packed decimal but without seeing the hex display it is hard to tell. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The unload used the attributes of the database fields. In your unloaded file, you have packed-decimal (comp-3) values that are perfectly valid.
You have not posted the data in hex. If you do, it will make more sense.
For example, the ampersand "&" is a hex 50. The "<" is hex 4C. There is your 504 in packed decimal (x'504C'). |
|
Back to top |
|
|
xylene567 Warnings : 1 New User
Joined: 11 Jun 2007 Posts: 12 Location: TVM
|
|
|
|
The output file in hex format !
Code: |
000001 &<
000054
00000C
-----------------------------------------------------------------------------
000002 ë<
000054
00003C
-----------------------------------------------------------------------------
000003 Î
000070
00006C |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
When you post jcl, code, or data, it is a good ides to use the "Code" tab near the top of the reply panel. It preserves alignment and makes the info much more readable. Please note how your data looks now (i added the code tab).
What you have is valid packed-decimal (comp-3) output and that can be used directly in the process that will read the unloaded data (as long as the reading is done on the mainframe).
If this data is to be downloaded to some win-based or unix process, the packed-decimal data will not work. |
|
Back to top |
|
|
|