Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 1764
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 SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us