Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : When you specified V for RECFM parameter, LRECL value is largest record in the file plus 4 bytes. These four bytes contain the actual length of each variable length record in the file

Google
 
Web mainframegurukul.com

Elimination of Special Char. Using SORT.

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities
  View previous topic :: View next topic  
Author Message
Vikas.betu
Member


Joined: 18 Feb 2014
Posts: 29

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri May 23, 2014 3:40 am    Post subject: Elimination of Special Char. Using SORT. Reply with quote

Hi

I found below mention code to eliminate special char by using sort. But I am failed to change it as per my requirement. In this code we are passing data and creating 2 different files.
Requirement: I have a file of 350 record length and I need to replace all the special char with spaces or blanks. Could you please help me out to do this.
--------------------------------------------------------------------------------------

//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABCDERT123456eeefghnkl9876MMOP
ABCDFRGT'MN,34567iolkmn..OOPMQ
POLMNB'123456789opnmcb
//FILEA DD SYSOUT=*
//FILEB DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(1,80,SS,EQ,C'`',OR,1,80,SS,EQ,C'`',OR,
1,80,SS,EQ,C'!',OR,1,80,SS,EQ,C'@',OR,
1,80,SS,EQ,C'#',OR,1,80,SS,EQ,C'$',OR,
1,80,SS,EQ,C'%',OR,1,80,SS,EQ,C'',OR,
1,80,SS,EQ,C'&',OR,1,80,SS,EQ,C'*',OR,
1,80,SS,EQ,C'(',OR,1,80,SS,EQ,C')',OR,
1,80,SS,EQ,C'_',OR,1,80,SS,EQ,C'-',OR,
1,80,SS,EQ,C'+',OR,1,80,SS,EQ,C'=',OR,
1,80,SS,EQ,C'',OR,1,80,SS,EQ,C'{',OR,
1,80,SS,EQ,C'',OR,1,80,SS,EQ,C'}',OR,
1,80,SS,EQ,C'\',OR,1,80,SS,EQ,C'/',OR,
1,80,SS,EQ,C'|',OR,1,80,SS,EQ,C';',OR,
1,80,SS,EQ,C'[',OR,1,80,SS,EQ,C']',OR,
1,80,SS,EQ,C':',OR,1,80,SS,EQ,C',',OR,
1,80,SS,EQ,C'<',OR,1,80,SS,EQ,C'>',OR,
1,80,SS,EQ,C'.',OR,1,80,SS,EQ,C'?',OR,
1,80,SS,EQ,C'"',OR,1,80,SS,EQ,C'''',OR,
1,80,SS,EQ,C'^',OR,1,80,SS,EQ,X'05'),
OVERLAY=(81:C'B'))

OUTFIL FNAMES=FILEA,BUILD=(1,80),INCLUDE=(81,1,CH,EQ,C' ')
OUTFIL FNAMES=FILEB,BUILD=(1,80),SAVE
//*
------------------------------------------------------------------------------------
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

William Collins
Active Member


Joined: 24 May 2012
Posts: 732

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri May 23, 2014 11:13 am    Post subject: Reply with quote

Have a look at ALTSEQ in your documentation.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Vikas.betu
Member


Joined: 18 Feb 2014
Posts: 29

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri May 23, 2014 7:18 pm    Post subject: Reply with quote

Hi William

Thanks
I am currently using ALTSEQ for replacing special characters. However I am not able to replace all the special char thats why I am want to try this.

so help me to use this for my requirement
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
DikDude
Moderator


Joined: 22 Jul 2011
Posts: 1001
Location: usa

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri May 23, 2014 11:29 pm    Post subject: Reply with quote

Why do you believe you cannot change some of the values?

Every possible bit pattern (from x'00' thru x'FF') can be handled by ALTSEQ.

If you cannot, then there is some understanding that is missing.
_________________
Have a good one
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Vikas.betu
Member


Joined: 18 Feb 2014
Posts: 29

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Sat May 24, 2014 1:56 am    Post subject: Reply with quote

Thanks Dick but do u have list bit pattern (from x'00' thru x'FF') for all special characters. If yes then please provide me the same. As I tried as much as I could but still there are some characters which are missing and I can't recognise the bit pattern (from x'00' thru x'FF') for them.
Sad Sad
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
NicC
Active Member


Joined: 24 Jul 2011
Posts: 650
Location: Down on the pig farm

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Sun May 25, 2014 3:52 am    Post subject: Reply with quote

Suggest you google 'ebcdic codes' - or, even easier, create a dataset using ispf edit with hex on with all codes from x'00' to x'ff'.
_________________
Regards
Nic
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 981

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon May 26, 2014 7:54 pm    Post subject: Reply with quote

depending upon the code set on your computer,
you are better off using NicC's second suggestion.
easiest would be to use the REXX XRANGE function and then write the output to a file and then view it.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
academyindia4
Guest





Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jan 15, 2016 8:22 pm    Post subject: Topic deleted by Admin Reply with quote

<< Content deleted By Admin >>
Back to top
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-7580.html