View previous topic :: View next topic |
Author |
Message |
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Wed Dec 07, 2005 5:40 am Post subject: Getting rid of Junkies before Loading to DB |
|
|
I have a file with some junk value like (....................) actually these came in to the DB due to NOT properly initializing the Working Storage variable. So I believe these are some LOW-VALUES or HIGH-VALUES.
The question is, I have to Load the data in the file to a table during which I need to get rid of those junkies by replacing with spaces as these are CHAR fields.
I am using DSNUTILB utility to load the data from the file to DB2 table. What should I do to repalce the junkies with spaces while loading the data from file to table.
Is there a way to RE-SORT the file first for replacing junkies with space and then proceed with the load?
Quote: |
010266504 00046 00000081000000000000
010266504 00058 00000000000000000000
010266504 00116 ....................
010266504 00149 ....................
010266504 00151 ....................
010266504 00165 ....................
010266504 00173 ....................
010266504 00174 YES
010266504 00175 Y
010266504 00180 ....................
010266504 00272 A1
010266505 00009 00000020000000000000
010266505 00046 00000369400000000000
010266505 00058 00000000000000000000
010266505 00149 ....................
010266505 00165 ....................
010266505 00173 ....................
|
|
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Wed Dec 07, 2005 6:22 am Post subject: |
|
|
Thanks kolusu, After posting I was making the search and was looking into that post.
But There seems to be some error in OUTREC.
I am getting the below error message
WER268A OUTREC STATEMENT : SYNTAX ERROR |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed Dec 07, 2005 6:28 am Post subject: |
|
|
sakreg,
You need to post the entire sysout messages instead of just one line. I guess your version of syncsort does not support ALTSEQ option. If that is the case then we need to use CHANGE parameter to replace the values. Please post the error messages
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Thu Dec 08, 2005 4:04 am Post subject: |
|
|
This is what I see in the SYSOUT
Code: |
********************************* TOP OF DATA **********************************************************
1 SYNCSORT FOR Z/OS 1.1DR TPF3A U.S. PATENTS: 1234567, 1234567 (C) 2002 SYNCSORT INC. DATE=2005/342 TIME=03.45.20
z/OS 1.4.0
PRODUCT LICENSED FOR CPU SERIAL NUMBER 12345, MODEL 1234 LICENSE/PRODUCT EXPIRATION DATE: 02 DEC 9999
SYSIN :
OPTION COPY
ALTSEQ CODE=(0040)
OUTREC FIELDS=(1,LRECL,TRAN=ALTSEQ)
*
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
******************************** BOTTOM OF DATA ********************************************************
|
|
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Thu Dec 08, 2005 4:36 am Post subject: |
|
|
sakreg, Quote: |
SYSIN :
OPTION COPY
ALTSEQ CODE=(0040)
OUTREC FIELDS=(1,LRECL,TRAN=ALTSEQ)
|
LRECL needs to be your file LRECL which should be numeric value. Change that and you should be fine.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Thu Dec 08, 2005 4:44 am Post subject: |
|
|
kolusu, Thats Right I missed replacing LRECL with the actual value.
Now it is working great. |
|
Back to top |
|
|
|
|