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
 

 

Sort card to identify special characters

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

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Wed May 14, 2008 12:47 pm    Post subject: Sort card to identify special characters
Reply with quote

have a data set which contains names only. some of the names have special characters embedded in the data. Need a sort card to eliminate/identify the records with special characters.
for reference i have given few names below
BIXENTA
BL`R
BL`THAN
BLADE
BLAINE
BLAIR
BLAISE
BLAKE

Thaks
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed May 14, 2008 1:57 pm    Post subject:
Reply with quote

Please check the below example and modify as per your requirement
Code:
//STEP0100 EXEC PGM=SORT     
//SYSOUT   DD SYSOUT=*       
//SORTIN   DD *             
BIXENTA                     
BL`R                         
BL`THAN                     
BLADE                       
BLAINE                       
BLAIR                       
BLAISE                       
BLAKE                       
/*                           
//SORTOUT  DD SYSOUT=*       
//SYSIN    DD *             
  OPTION COPY               
  OMIT COND=(1,10,SS,EQ,C'`')
//*                         
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Wed May 14, 2008 3:55 pm    Post subject: Reply to: sort card to identify
Reply with quote

hi,
i think it will not work..coz the problem is these special charecters
can be anywhere inside the name.its position is not fixed and also
it can be anyspecial charecter not necessarily a " ' " .i hope you
got my requirement..if position is not fixed then how we can
do it in a sort card.may be using cobol we can do it.but i have to
do it using a sort card..is there a way
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed May 14, 2008 4:50 pm    Post subject:
Reply with quote

1. The solution that i have provided, checks for the character ` anywhere in first 10 characters.
2. Do you have the possible set of Junk characters , If you know the possible set of Junk characters you can try
Code:
//STEP0100 EXEC PGM=SORT       
//SYSOUT   DD SYSOUT=*         
//SORTIN   DD *               
BIXENTA                       
BL`R                           
BL`THAN                       
BLADE                         
BL&INE                         
BLAIR                         
BLA*SE                         
BLAKE                         
/*                             
//SORTOUT  DD SYSOUT=*         
//SYSIN    DD *               
  OPTION COPY                 
  OMIT COND=(1,10,SS,EQ,C'*',|,
             1,10,SS,EQ,C'`',|,
             1,10,SS,EQ,C'&') 
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: Wed May 14, 2008 8:13 pm    Post subject:
Reply with quote

Hello,

Do you really want to discard all of the records containing some unwanted special character? Seems like those would still be good/valid records - they just have some character(s) that not acceptable in the file/data.
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Thu May 15, 2008 11:23 am    Post subject: Reply to: Sort card to identify special characters
Reply with quote

Hi dick,
you are right.I just want to identify the records in a separate file which
have the names with special charecter.
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: Thu May 15, 2008 11:27 am    Post subject:
Reply with quote

Hello,

If you use INCLUDE rather than OMIT you should get a file of those records.
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Fri May 16, 2008 3:01 pm    Post subject:
Reply with quote

dick write
Quote:
Do you really want to discard all of the records containing some unwanted special character? Seems like those would still be good/valid records - they just have some character(s) that not acceptable in the file/data


can u pls suggest me how to discard only those unwanted charecters.
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: Fri May 16, 2008 7:10 pm    Post subject:
Reply with quote

Hello,

Quote:
how to discard only those unwanted charectrs
Demonstrate this "discard" in some example data. Your previous post said you wanted these records in a separate file.

Please re-post your complete requirement including some input data and the output(s) you want from that data. The topic appears to have gone in multiple directions.

Once we get things straight, i'll go back and remove the unneeded posts.
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Fri May 16, 2008 9:14 pm    Post subject:
Reply with quote

Code:
//STEP0100 EXEC PGM=SORT       
//SYSOUT   DD SYSOUT=*         
//SORTIN   DD *               
BIXENTA                       
BL`R                           
BL`THAN                       
BLADE                         
BL&INE                         
BLAIR                         
BLA*SE                         
BLAKE                         
/*                             
//OUT1        DD DSN=HLQ.ONLY.SPECCHAR,DISP=.......
//OUT2        DD DSN=HLQ.NO.SPEC.CHAR,DISP=.......
//SYSIN    DD *               
  OPTION COPY
  OUTFIL FNAMES=OUT1,                 
             INCLUDE=(1,10,SS,EQ,C'*',or,
             1,10,SS,EQ,C'`',or,
             1,10,SS,EQ,C'&') 

  OUTFIL FNAMES=OUT2,SAVE               
/*
In the jcl, only those records that have either of three special characters anywhere in the first 10 bytes in the record will be written to OUT1 file i.e
HLQ.ONLY.SPECCHAR.
THe records that don't contain the above three special chars will be written to OUT2 file i.e HLQ.NO.SPEC.CHAR.


-Ajay
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: Sat May 17, 2008 12:03 am    Post subject:
Reply with quote

Hello,

The posted "code" does not address this:
Quote:
can u pls suggest me how to discard only those unwanted charecters.
Once a proper requirement definition has been posted, we can better offer suggestions.
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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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