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

jcl to add three digits to existing dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Oct 07, 2006 1:21 am
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:

Use [URL] BBCode for External Links
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Adding first / last acct numerber to ... DFSORT/ICETOOL 7
Search our Forums:

Back to Top