replacing values in a VSAM file

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

replacing values in a VSAM file

Postby rajaranganathan » Thu Nov 07, 2013 1:05 am

Hi All,

i have a file in which i need to replace a in particular position with another value.


if 190 replace with 200
if 191 replace with 201
and its keeps going till
if 210 replace with 220.

Please help, how this can be performed in a sort.
Posts: 27
Joined: Thu Oct 10, 2013 6:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: replacing values in a VSAM file

Postby Akatsukami » Thu Nov 07, 2013 1:12 am

What kind of VSAM data set is it? Are the altered positions part of a key?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Global moderator
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: replacing values in a VSAM file

Postby NicC » Thu Nov 07, 2013 5:21 am

If you want to do it in sort why waste time posting in the JCL section when there are sections for both Dfsort and Syncsort? Which sort product do you use? Tell us that and your topic will be moved to the correct part of the forum.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Global moderator
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: replacing values in a VSAM file

Postby BillyBoyo » Thu Nov 07, 2013 6:39 am

Your SORTIN and SORTOUT should be different datasets. You should not attempt to update a VSAM dataset "in place" with your SORT product.
Global moderator
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Return to JCL


  • Related topics
    Last post