MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting rid of Junkies before Loading to DB

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Wed Dec 07, 2005 5:40 am    Post subject: Getting rid of Junkies before Loading to DB Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Dec 07, 2005 6:07 am    Post subject: Reply with quote

sakreg,

Please search before posting. check this link

http://mvsforums.com/helpboards/viewtopic.php?t=5350

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Wed Dec 07, 2005 6:22 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Dec 07, 2005 6:28 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Thu Dec 08, 2005 4:04 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Dec 08, 2005 4:36 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Thu Dec 08, 2005 4:44 am    Post subject: Reply with quote

kolusu, Thats Right I missed replacing LRECL with the actual value.

Now it is working great.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group