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


     
 
MAINFRAME - TIP OF THE DAY : Q. If there is a situation, where we need to code more than 255 steps in a JOB? A. We need to split jcl into two jcls , at the end of the first jcl check the condition code and initiate the second jcl.

Google
 
Web mainframegurukul.com

Welcome to the mainframegurukul forums.

You are currently viewing our mainframe forums as a guest which gives you limited access to view most discussions, articles. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support at admin@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

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

Frank Yaeger
Moderator


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

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
rachitsethcse
Member


Joined: 21 Jul 2009
Posts: 3

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
Frank Yaeger
Moderator


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

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
rachitsethcse
Member


Joined: 21 Jul 2009
Posts: 3

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
Frank Yaeger
Moderator


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

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
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

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts What does a career in IT look like today for someone new? 2 MrSpock 451 Tue Jun 29, 2010 1:40 pm
Anuj Dhawan View latest post
No new posts Please someone explain the concepts of certifications 5 MrSpock 974 Fri Mar 19, 2010 1:57 pm
Anuj Dhawan View latest post
No new posts continuation character in File-Aid batch. 2 arrbee 2561 Fri Jun 26, 2009 7:05 pm
Dave E View latest post
No new posts Character conversions 4 Sayton 1469 Tue Jun 02, 2009 11:47 pm
Alissa Margulies View latest post
No new posts What is the prefix character for symbolic parameter ? 1 Krishna 1263 Tue May 12, 2009 6:40 pm
Krishna View latest post
 



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

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