View previous topic :: View next topic
|
Author |
Message |
sabarikanth
New User
Joined: 07 Jun 2010 Posts: 59 Location: coimbatore
|
|
|
|
Hi All,
Could please help me in getting out a solution for the below query.
My requirement is to check for a non numeric field in a dataset and need to omit that record in the output dataset.
I used OMIT COND to eliminate the non-numeric record in the dataset. But i'm getting abend for it.
For example.
My Input dataset (lrec=9)
Code: |
001234567
001234568
001234569
001234551
0B1234552 |
My output dataset (lrec=50) should be,
Code: |
001234551
001234567
001234568
001234569 |
|
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Is "non-numeric" defined as "other than decimal digits" or are signs, separators, and leading spaces acceptable? Are these all a single field (i.e., can you guarantee that there will be no legitimate overpunches)? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Also, it will probably help us help you if you post the jcl and sort control statements used.
When posting these, please use the "Code" tag to preserve alignment and improve readability. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
sabarikanth
New User
Joined: 07 Jun 2010 Posts: 59 Location: coimbatore
|
|
|
|
Hmm.. Ya its not oly non numeric but any junk values can be present in the record.
Quote: |
Is "non-numeric" defined as "other than decimal digits" or are signs, separators, and leading spaces acceptable? Are these all a single field (i.e., can you guarantee that there will be no legitimate overpunches)? |
Also i assure that it ll be only numeric records to be present in the output dataset as i have given an example before. |
|
Back to top |
|
|
sabarikanth
New User
Joined: 07 Jun 2010 Posts: 59 Location: coimbatore
|
|
|
|
Frank Yaeger,
I guess u speaking about using "NUM" field in sortcard.
something like...
Code: |
INCLUDE COND=(1,9,CH,EQ,NUM) |
But unfortunately its not working. I think the version i'm using is not compactable. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
unfortunately its not working. |
Please show the messages you received. |
|
Back to top |
|
|
sabarikanth
New User
Joined: 07 Jun 2010 Posts: 59 Location: coimbatore
|
|
|
|
Frank Yaeger,
This was the message form spool,
Code: |
INCLUDE COND=(1,11,CH,EQ,NUM)
*
WER161B ALTERNATE PARM USED
WER268A INCLUDE STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You are using Syncsort - not DFSORT. . . |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Which release of Syncsort is being used? The release info is at the top of the informational output generated by an execution. |
|
Back to top |
|
|
sabarikanth
New User
Joined: 07 Jun 2010 Posts: 59 Location: coimbatore
|
|
|
|
I'm not sure whether this is what you asking for...
Code: |
SYNCSORT FOR Z/OS 1.3.1.0N |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Yes, that is the requested release info.
Suggest you read about NUM in the documentation. This is a bit of it:
Quote: |
Use NUM to identify a field as numeric or non-numeric in CSF/FS, PD or ZD format. Specify
NUM with the field (p,l), format (CSF/FS, PD or ZD) and comparison operators (EQ or
NE), . . . . |
|
|
Back to top |
|
|
sabarikanth
New User
Joined: 07 Jun 2010 Posts: 59 Location: coimbatore
|
|
|
|
Ya Dick,
Its working. i used
Code: |
INCLUDE COND=(1,9,FS,EQ,NUM) |
The above code wil delete the record which has non-numeric data in it.
Is their an option, whether the deleted records could be written in another file. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Is their an option, whether the deleted records could be written in another file. |
You should be able to define another output DD and use the SAVE feature to write these to another file.
Something like:
Code: |
OUTFIL FILES=02,SAVE |
|
|
Back to top |
|
|
|