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 supress a character???

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Gabriel Araujo Alves

New User


Joined: 20 Jul 2010
Posts: 38
Location: Brazil

PostPosted: Fri Mar 02, 2012 10:49 pm    Post subject: how to supress a character???
Reply with quote

i have this sortin. lrecl=080

Code:
 
//SORTIN    DD  *             
D'AVILA                       
D'A'VILA                       
D'AVI'LA                       
D AVILA                       
D AVI LA                       
D AV  ILA                     
/*                             


and i want to supress this character ' (apostrophe) and i want this sortout.

Code:



DAVILA                       
DAVILA                       
DAVILA                       
D AVILA                       
D AVI LA                       
D AV  ILA   


how can i do this?? please someone help me,
thk's
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: Fri Mar 02, 2012 11:47 pm    Post subject:
Reply with quote

You can use a DFSORT job like the following:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
D'AVILA
D'A'VILA
D'AVI'LA
D AVILA
D AVI LA
D AV  ILA
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  INREC FINDREP=(IN=C'''',OUT=C'')
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
Back to top
View user's profile Send private message
Gabriel Araujo Alves

New User


Joined: 20 Jul 2010
Posts: 38
Location: Brazil

PostPosted: Sat Mar 03, 2012 12:20 am    Post subject:
Reply with quote

Thanks a lot...
Back to top
View user's profile Send private message
Gabriel Araujo Alves

New User


Joined: 20 Jul 2010
Posts: 38
Location: Brazil

PostPosted: Tue Mar 06, 2012 2:54 am    Post subject:
Reply with quote

Frank Yaeger

when i use this code.

Code:
 
INREC FINDREP=(STARTPOS=1,ENDPOS=20,IN=X'00',OUT=C'')


the positions after field 20 are being displaced, how can i preserve
the fields out of this range???? I hope u can help-me, thanks.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Mar 06, 2012 3:01 am    Post subject:
Reply with quote

Gabriel Araujo Alves wrote:
Frank Yaeger

when i use this code.

Code:
 
INREC FINDREP=(STARTPOS=1,ENDPOS=20,IN=X'00',OUT=C'')


the positions after field 20 are being displaced, how can i preserve
the fields out of this range???? I hope u can help-me, thanks.


Use SHIFT=NO to preserve the fields . so change your control cards to the following

Code:

INREC FINDREP=(STARTPOS=1,ENDPOS=20,SHIFT=NO,IN=C'''',OUT=C'')
Back to top
View user's profile Send private message
Gabriel Araujo Alves

New User


Joined: 20 Jul 2010
Posts: 38
Location: Brazil

PostPosted: Tue Mar 06, 2012 3:21 am    Post subject:
Reply with quote

This way, the findrep does not works anymore. look at my code.

Code:


//S1 EXEC PGM=SORT                                                   
//SYSOUT DD SYSOUT=*                                                 
//SORTIN DD *                                                         
D'AVILA             |                                                 
D'A'VILA            |                                                 
D'AVI'LA            |                                                 
D AVILA             |                                                 
D AVI LA            |                                                 
D AV  ILA           |                                                 
//SORTOUT DD SYSOUT=*                                                 
//SYSIN DD *                                                         
  OPTION COPY                                                         
  INREC FINDREP=(STARTPOS=1,ENDPOS=20,SHIFT=NO,IN=C'''',OUT=C'')     
/*                                                                   



and my sortout.

Code:


D'AVILA             |
D'A'VILA            |
D'AVI'LA            |
D AVILA             |
D AVI LA            |
D AV  ILA           |



does not suppress the field anymore.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Mar 06, 2012 6:20 am    Post subject:
Reply with quote

Hi,

I agree with you that SHIFT=NO is not working as intended, this might be a work around

Code:
  OPTION COPY                                                         
  INREC BUILD=(21,60,1,20)                                           
  OUTREC FINDREP=(STARTPOS=61,ENDPOS=80,IN=C'''',OUT=C'')             
  OUTFIL BUILD=(61,20,1,60)                                           


Gerry
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Tue Mar 06, 2012 10:00 pm    Post subject:
Reply with quote

Your "IN" parameter changed int he middle of the thread... make sure you still have the apostrophe instead of X'00', both in the data and the parm card.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Mar 07, 2012 12:55 am    Post subject:
Reply with quote

Gabriel Araujo Alves,

I am sorry I made a mistake. You need to use the approach shown by gcicchet by copying the contents to be changed to end of the record and overlaying it back later.
Back to top
View user's profile Send private message
Gabriel Araujo Alves

New User


Joined: 20 Jul 2010
Posts: 38
Location: Brazil

PostPosted: Wed Mar 07, 2012 1:50 am    Post subject:
Reply with quote

Skolosu,

no problem. Thanks for the concern.
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
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
No new posts Continuation Character ballaswaroop SYNCSORT 8 Thu Aug 25, 2016 4:46 pm
No new posts Adding a descending character to a file Steve Ironmonger DFSORT/ICETOOL 3 Fri Jul 15, 2016 4:57 pm
No new posts Moving character data to smallint in db2 rikdeb DB2 5 Thu Jul 14, 2016 12:38 am
No new posts character setting configuration into ... sakthikumarT DB2 5 Thu Nov 05, 2015 11:37 am


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