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

Replacing characters Using JCL

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> JCL
  View previous topic :: View next topic  
Author Message
rachitsethcse
Member


Joined: 21 Jul 2009
Posts: 3

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

PostPosted: Tue Jul 21, 2009 8:09 pm    Post subject: Replacing characters Using JCL Reply with quote

Hi

I wanted to convert some specific set of characters to some other characters in the given dataset using JCL.is it possible to do ?

Like I have dataset File1 which can have some special character for example $ now i want to convert all the $ sign with S in the dataset also i have file 2 which consists of this special character mapped with the new character.
Can i do it using JCL.Its urgent Pls reply soon if someone have idea about this.
Back to top
View user's profile Send private message Send e-mail
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 812
Location: San Jose, CA

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

PostPosted: Tue Jul 21, 2009 9:36 pm    Post subject: Reply with quote

It's not clear what you want to do.

Please show an example of the records in each input file and what you expect for output. Explain the "rules" for getting from input to output. Give the RECFM and LRECL of the input file. Give the starting position, length and format of all relevant fields.
_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
rachitsethcse
Member


Joined: 21 Jul 2009
Posts: 3

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

PostPosted: Wed Jul 22, 2009 10:48 am    Post subject: Reply with quote

Ok..I will explain you with an example here.

Let say i have a file having record layout as follows:

1)Name pic X(10)
2)Address Pic x(30)
3)Telephoneno 9(10)
4)Profession x(10)
5)ISNno X(10)

Now i have created a dataset using a program.Now any of these fields can have some characters other than A-Z or 0-9 for example Name field can have a value as $id.

Now I have one more dataset which as record layout as follows:

1)Special char PIC X(1)
2)Actual char PIC X(1)

Now this file give me the corresponding character which should replace the special char from first file.

For example above I have given an example that Name field can have value $id.Now I have to replace this $ with some other value which is defined in file 2.
Likewise i have to it for all such special character appearing in my file1 with cooresponding character defined in file2.
Back to top
View user's profile Send private message Send e-mail
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 812
Location: San Jose, CA

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

PostPosted: Wed Jul 22, 2009 7:51 pm    Post subject: Reply with quote

Please run the following job and show me the messages you receive in //SYSOUT so I can see which sort product you're using and what level it's at:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
RECORD 1
//SORTOUT DD DUMMY
//SYSIN    DD    *
  OPTION COPY

_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
rachitsethcse
Member


Joined: 21 Jul 2009
Posts: 3

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

PostPosted: Thu Jul 23, 2009 11:10 am    Post subject: Hi i am getting following output in sysout Reply with quote

ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 08:07 ON THU JUL
OPTION COPY
ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 C9-BASE E5-K35433
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICETD1 INSTALLATION MODULE SELECTED
ICE088I 0 SC1020S .S1 . , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,6291456,6278238)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6200798,6200798)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=2097152,MINLIM=524288,EQUALS=N,LIST=Y,ERE
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=SHORT,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=12288,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITC
0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMI
0 OPTIONS: NULLOUT=RC0
0 BSAM ACCESS METHOD USED FOR SORTOUT
0 BSAM ACCESS METHOD USED FOR SORTIN
1 EF-K10929 F0-K30362 E8-K24705
0 OUTPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
0 INSERT 0, DELETE 0
0 RECORDS - IN: 1, OUT: 1
0 END OF DFSORT
Back to top
View user's profile Send private message Send e-mail
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 812
Location: San Jose, CA

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

PostPosted: Thu Jul 23, 2009 9:46 pm    Post subject: Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  replace file (FB)
//SORTOUT DD DSN=&&C1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(3:1,1,HEX,2,1,HEX,C',',80:X)
//S2    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  name file (FB/70)
//SORTOUT DD DSN=...  output file (FB/70)
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(1,70,TRAN=ALTSEQ)
  ALTSEQ CODE=(C1C1,
/*
// DD DSN=&&C1,DISP=(OLD,PASS)
// DD *
  C1C1)
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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: Mon Feb 01, 2016 1:27 am    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.
academyindia4
Guest





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

PostPosted: Wed Feb 03, 2016 12:41 am    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 -> JCL 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-4496.html