IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Syncsort - To remove Non numeric data in a dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sabarikanth

New User


Joined: 07 Jun 2010
Posts: 59
Location: coimbatore

PostPosted: Tue Nov 30, 2010 3:01 am
Reply with quote

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

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Nov 30, 2010 3:08 am
Reply with 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)?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 30, 2010 3:10 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Nov 30, 2010 3:24 am
Reply with quote

sabarikanth,

I believe the DFSORT NUM function discussed in the "Check for a numeric string" Smart DFSORT Trick will do what you want. See:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000094
Back to top
View user's profile Send private message
sabarikanth

New User


Joined: 07 Jun 2010
Posts: 59
Location: coimbatore

PostPosted: Tue Nov 30, 2010 3:26 am
Reply with quote

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

New User


Joined: 07 Jun 2010
Posts: 59
Location: coimbatore

PostPosted: Tue Nov 30, 2010 3:41 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Nov 30, 2010 3:53 am
Reply with quote

Quote:
unfortunately its not working.


Please show the messages you received.
Back to top
View user's profile Send private message
sabarikanth

New User


Joined: 07 Jun 2010
Posts: 59
Location: coimbatore

PostPosted: Tue Nov 30, 2010 4:00 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 30, 2010 4:08 am
Reply with quote

Hello,

You are using Syncsort - not DFSORT. . .
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 30, 2010 4:11 am
Reply with quote

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

New User


Joined: 07 Jun 2010
Posts: 59
Location: coimbatore

PostPosted: Tue Nov 30, 2010 4:14 am
Reply with quote

I'm not sure whether this is what you asking for...
Code:

SYNCSORT FOR Z/OS  1.3.1.0N
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 30, 2010 4:21 am
Reply with quote

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

New User


Joined: 07 Jun 2010
Posts: 59
Location: coimbatore

PostPosted: Tue Nov 30, 2010 4:41 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 30, 2010 10:33 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top