Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
jcl to add three digits to existing dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
naveen_amudalapelly
Warnings : 1

New User


Joined: 15 Oct 2004
Posts: 16

PostPosted: Sat Oct 07, 2006 1:11 am    Post subject: jcl to add three digits to existing dataset
Reply with quote

Hi.

is there anyway to write a jcl to add three letters for each record at a particular position in existing dataset without effecting the existing data

say suppose i have one data set of contains address of list of customers now i wuld like to add "IND" at 50th position to each record in the dataset without effecting the existing data
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: Sat Oct 07, 2006 1:21 am    Post subject:
Reply with quote

You can use a DFSORT job like the following to do what you asked for:

Code:

//S1 EXEC PGM=ICEMAN                       
//SYSOUT DD SYSOUT=*                       
//SORTIN DD DSN=...  input file       
//SORTOUT DD DSN=...  output file                     
//SYSIN   DD *                             
   OPTION COPY                             
   INREC OVERLAY=(50:C'IND')     
/*         


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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
Back to top
View user's profile Send private message
naveen_amudalapelly
Warnings : 1

New User


Joined: 15 Oct 2004
Posts: 16

PostPosted: Sat Oct 07, 2006 1:29 am    Post subject: Re: jcl to add three digits to existing dataset
Reply with quote

Thank you Frank....
Back to top
View user's profile Send private message
prasanth_thavva

New User


Joined: 28 Jul 2005
Posts: 86
Location: Chennai

PostPosted: Sat Oct 07, 2006 6:06 pm    Post subject: how to reformat the data with out effecting the existing dat
Reply with quote

hi,

i guess we can use

SORT card

INREC and OUTREC cards to modify the existing data?

Thanks&Regards
Venkata Prasanth
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
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us