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
 

 

How to use DFSORT to filter invalid alphanumeric?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Lord.of.Wind

New User


Joined: 17 Nov 2005
Posts: 60

PostPosted: Mon May 14, 2007 11:22 am    Post subject: How to use DFSORT to filter invalid alphanumeric?
Reply with quote

I need to filter all invalid alphanumeric part numbers in a file.
For each part number, there may be one record or multiple, and any part number containing an alpha character or is less than 8 digits should be excluded from this processing.
The position and length of part number is (1,10).

I have an idea about this, but I am not sure if it works.
CONVERT (1,10) TO X (DECIMAL DIGIT)
{But I am wondering whether SORT will abend if the input data containing characters. For example, while converting 5G123456, definetely the SORT will abend}
IF X < 1000000
OMIT THE RECORD
READ NEXT UNTIL FILE END.


Could body share his/her experience on this?
Very appreciate for the help.
Back to top
View user's profile Send private message

Lord.of.Wind

New User


Joined: 17 Nov 2005
Posts: 60

PostPosted: Mon May 14, 2007 11:30 am    Post subject:
Reply with quote

Just looked up in reference book, I tried to write the following codes:

Code:
//S1    EXEC  PGM=ICEMAN                 
//SYSOUT    DD  SYSOUT=*                 
//SORTIN DD DSN=...  input file (FB/144)   
//SORTOUT DD DSN=...  output file (FB/???)
//SYSIN    DD    *                       
  INCLUDE COND=(1,10,FS,EQ,NUM)
  OMIT COND=(1,10,ZD,LT,1000000)
  OPTION COPY   
/*



Will it work?
Back to top
View user's profile Send private message
ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Mon May 14, 2007 12:17 pm    Post subject:
Reply with quote

Hi,
You cannot use INCLUDE and OMIT simultaneously.
Try this.
Code:

INCLUDE COND=(1,10,FS,EQ,NUM,AND,1,10,ZD,GT,9999999)


--Parag
Back to top
View user's profile Send private message
Lord.of.Wind

New User


Joined: 17 Nov 2005
Posts: 60

PostPosted: Mon May 14, 2007 12:32 pm    Post subject:
Reply with quote

I tried it, but got an error message:
Code:
WER268A  INCLUDE STATEMENT : SYNTAX ERROR
Back to top
View user's profile Send private message
Lord.of.Wind

New User


Joined: 17 Nov 2005
Posts: 60

PostPosted: Mon May 14, 2007 12:35 pm    Post subject:
Reply with quote

the following is the test data:
Code:
1234567890000100000100000100000100000100000100000100000100
A234567890000110000110000110000110000110000110000110000110
12A4567890000120000120000120000120000120000120000120000120
0234467890000130000130000130000130000130000130000130000130
1234 67890000140000140000140000140000140000140000140000140
0234567890000150000150000150000150000150000150000150000150
123456D890000160000160000160000160000160000160000160000160
123456FF90000170000170000170000170000170000170000170000170
12345678T0000180000180000180000180000180000180000180000180
12345678 0000190000190000190000190000190000190000190000190
9234567890000191000191000191000191000191000191000191000191
Back to top
View user's profile Send private message
Lord.of.Wind

New User


Joined: 17 Nov 2005
Posts: 60

PostPosted: Mon May 14, 2007 2:47 pm    Post subject:
Reply with quote

Code:
SYSIN :                                             
 INCLUDE COND=(1,10,FS,EQ,NUM,AND,1,10,ZD,GT,9999999)
                          [color=red]*[/color]                         
WER268A  INCLUDE STATEMENT : SYNTAX ERROR           

It seems that we do have the lastest version of SORT.
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: Mon May 14, 2007 7:45 pm    Post subject:
Reply with quote

Hello,

You may have the latest version, but you have Syncsort - not DFSORT.
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: Mon May 14, 2007 8:45 pm    Post subject:
Reply with quote

L.O.W.,

The WER message indicates you're using Syncsort, not DFSORT. DFSORT supports the NUM function - Syncsort does not.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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