Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Syncsort - To remove Non numeric data in a dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort - To remove Non numeric data in a dataset
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: 1777
Location: Bloomington, IL

PostPosted: Tue Nov 30, 2010 3:08 am    Post subject:
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

Site Director


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

PostPosted: Tue Nov 30, 2010 3:10 am    Post subject:
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 Moderator


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

PostPosted: Tue Nov 30, 2010 3:24 am    Post subject:
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:

http://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    Post subject: Reply to: To remove Non numeric data in a dataset
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    Post subject: Reply to: To remove Non numeric data in a dataset
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 Moderator


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

PostPosted: Tue Nov 30, 2010 3:53 am    Post subject:
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    Post subject: Reply to: To remove Non numeric data in a dataset
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

Site Director


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

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

Hello,

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

Site Director


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

PostPosted: Tue Nov 30, 2010 4:11 am    Post subject:
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    Post subject: Reply to: Syncsort - To remove Non numeric data in a dataset
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

Site Director


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

PostPosted: Tue Nov 30, 2010 4:21 am    Post subject:
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    Post subject: Reply to: Syncsort - To remove Non numeric data in a dataset
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

Site Director


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

PostPosted: Tue Nov 30, 2010 10:33 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us