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

eliminating a character from records


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
satyalathas

New User


Joined: 04 Oct 2010
Posts: 5
Location: Chennai

PostPosted: Wed Oct 06, 2010 10:46 am
Reply with quote

how to eliminate one characters from the records of a flat file irrespective of its position in using jcl sort card.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 06, 2010 12:00 pm
Reply with quote

How about some useful information that is seriously lacking here. Had you have searched the forum you would have seen that almost every thread for sort asks the same questions.

Which sort product and release level are you using.
What is the DSORG, RECFM and LRECL of the input file
Are you removing or replacing the character,
- i.e. convert to a blank, or shift left when this character is found.

Topic will be moved to appropriate forum when the requested information is given.
Back to top
View user's profile Send private message
satyalathas

New User


Joined: 04 Oct 2010
Posts: 5
Location: Chennai

PostPosted: Wed Oct 06, 2010 12:48 pm
Reply with quote

//SORTIN DD *
ABCD!EFGHI!!!JKLM!0!!
ABCDEFGH!!IJKLMNOPQ!!!0!

Assume that, the above displayed is the input field. eliminate all the special characters “!” in the input records.
Position of the special character is not specified.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 06, 2010 12:59 pm
Reply with quote

expat wrote:
How about some useful information that is seriously lacking here. Had you have searched the forum you would have seen that almost every thread for sort asks the same questions.

Which sort product and release level are you using.
What is the DSORG, RECFM and LRECL of the input file
Are you removing or replacing the character,
- i.e. convert to a blank, or shift left when this character is found.

Topic will be moved to appropriate forum when the requested information is given.

Please read the questions asked and then answer all of them and only then will there be enough information to be able to help you.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Oct 06, 2010 2:22 pm
Reply with quote

I don't really like it when someone post question and even after when a direction is provided to them they don't really understand what to answer!

Arrghh - go search for FINDREP, if your sort product supports that. But even before using that you'd need to find out the answer for
Quote:
Are you removing or replacing the character,
.
Back to top
View user's profile Send private message
satyalathas

New User


Joined: 04 Oct 2010
Posts: 5
Location: Chennai

PostPosted: Wed Oct 06, 2010 2:27 pm
Reply with quote

Actually i didnt come across this problem while practicing. But i have seen this questin some where and i dont know the details u hav asked. So posted the exact problem i hav seen. One thing i know is v need to remove the character instead of replacing.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 06, 2010 3:14 pm
Reply with quote

To determine the product type and release level, please run the code below and post the output from the SYSOUT JES element.
Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY
Back to top
View user's profile Send private message
satyalathas

New User


Joined: 04 Oct 2010
Posts: 5
Location: Chennai

PostPosted: Wed Oct 06, 2010 3:25 pm
Reply with quote

Thanks for the guidance.
i vl do dat one and get back to you
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 06, 2010 5:32 pm
Reply with quote

I will assume that this is SYNCSORT rather than DFSORT.

Just to clarify, although I did ask you to post the output from SYSOUT. Are the message codes prefixed ICE or WER
Back to top
View user's profile Send private message
satyalathas

New User


Joined: 04 Oct 2010
Posts: 5
Location: Chennai

PostPosted: Wed Oct 06, 2010 5:41 pm
Reply with quote

yes it is SYNSORT only and the prefix is WER.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 06, 2010 5:44 pm
Reply with quote

Topic moved to the JCL forum for SYNCSORT guidance, eventually.
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: Wed Oct 06, 2010 8:40 pm
Reply with quote

Hello and welcome to the forum,

Quote:
i vl do dat one and get back to you

First - lose the kiddie chat-room text. . .

Next - completely describe what you "have" and what you want using what you have as input (show samples of the input and output (as you did icon_smile.gif )

Next, provide file attribute info (if you are running a test on your own, make up an input file and use those attributes).

When you have a question, you can save yourself a lot of time by looking for a prior topic that answers your question - almost everything asked has been asked before. Use the forum Search (above in the blue bar).
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Oct 06, 2010 9:24 pm
Reply with quote

Well, you did not what release/version of SyncSort are you using. It'll be shown there in the SYSOUT of Job from where you get the mesages prefixed with WER.

If you are using SYNCSORT FOR Z/OS 1.3.2.2R, you can use:
Code:
//PS0070 EXEC PGM=SORT           
//SYSOUT DD SYSOUT=*             
//SORTIN DD *                   
ABCD!EFGHI!!!JKLM!0!!           
ABCDEFGH!!IJKLMNOPQ!!!0!         
//SORTOUT DD SYSOUT=*           
//SYSIN DD *                     
  OPTION COPY                   
  INREC FINDREP=(IN=C'!',OUT=C'')
/*                               
//*                             

SORTOUT:
Code:
********************************* TOP OF DATA **********************************
ABCDEFGHIJKLM0                                                                 
ABCDEFGHIJKLMNOPQ0                                                             
******************************** BOTTOM OF DATA ********************************
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Oct 06, 2010 9:28 pm
Reply with quote

And if you are on some earlier version of SyncSort, please serach the Forum for "ALTSEQ" and SQZ. (SHIFT=LEFT should work for you.)
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top