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

How to use DFSORT to filter invalid alphanumeric?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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
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
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
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

Moderator Emeritus


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

PostPosted: Mon May 14, 2007 7:45 pm
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 Developer


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

PostPosted: Mon May 14, 2007 8:45 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts DFSORT - VB file RDW getting overridden DFSORT/ICETOOL 3
Search our Forums:

Back to Top