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

Problem with FINDREP on RRDS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Wed Jul 31, 2013 7:30 pm
Reply with quote

Hi,
I have used FINDREP command to replace string in RRDS file but it was not working.. pls suggest..

Code:
//STEP010 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=TEST.RRDS.VSAM,DISP=SHR
//*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  OUTREC FINDREP=(INOUT=(C'wxyz',C'Abcd'))
/*


Code'd
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Wed Jul 31, 2013 7:34 pm
Reply with quote

First, you should not tail-gate an old topic - it's tough to keep an eye on details for such a topic.

Second, when it did not work - what happened? An abend? Job executed but you did not get the expected the output? Something else?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Wed Jul 31, 2013 7:39 pm
Reply with quote

Because the control cards start in column 1? Of course, if OP had used the code tags, which he should know he should do after 7 years on the forum, we might see that they were not starting in cc1.
Back to top
View user's profile Send private message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Wed Jul 31, 2013 7:39 pm
Reply with quote

No abend MAXCC zero but String not replaced in the file.
Back to top
View user's profile Send private message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Wed Jul 31, 2013 7:48 pm
Reply with quote

Control cards starts with column 3. Apologies as pasted in forum in column 1.
There is no error in the JOB and returning MAXCC as zero, but no change in input file.

Please note i can't use any other output file. Input file only need to change and it is RRDS file. Please help.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 31, 2013 8:22 pm
Reply with quote

When you say "string not replaced in the file" you do realise that SORT cannot affect the input dataset?

You do realise that if it were working it would change (or attempt to change) the length of some of your RRDS records? Are you using variable-length RRDS anyway?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Jul 31, 2013 10:13 pm
Reply with quote

Hello,

Quote:
Input file only need to change and it is RRDS file.
You should not even try to do this . . . DO NOT try to overwrite the input data.

Suggest you run a test using an INCLUDE and see if the value is found. If it cannot be found, it cannot be changed.
Back to top
View user's profile Send private message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Wed Jul 31, 2013 11:09 pm
Reply with quote

It is fixed length rrds and length is 256. Yes string is there that need to replace in RRDS file.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Jul 31, 2013 11:33 pm
Reply with quote

Hello,

Quote:
Yes string is there that need to replace in RRDS file
Then you can proceed with a new process . . .

Quote:
DO NOT try to overwrite the input data.
Well managed operatons will not allow overwriting production input files . . .

Run the findrep creating a new file and then use the changed data file to reload the rrds.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 01, 2013 12:01 am
Reply with quote

SORT read its input (usually SORTIN DD) and writes its output (usually SORTOUT DD, but man other possibilities).

There is no "update in place" with SORT.

If you specifiy the same DSN for input and output DD then you deserve all the extra hassle it'll give you, so don't do that.

Either write a program, in the language of your choice, or do as Dick has said. The "flat" output from the SORT, with the FINDREP'd data, can then be again fed through a SORT to re-create your RRDS.

You have different lengths for your "in" and "out", so you will change your record-lengths for all "hits", and the RRDS may not like that anyway.
Back to top
View user's profile Send private message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Thu Aug 01, 2013 12:26 pm
Reply with quote

Looks like, editing input directly wont work, so i had back with old method working with VSAM like, reproing from VSAM to PS file, editing PS file though SORT/REXX, delete/define RRDS existing dataset and copying from edited PS file to RRDS dataset.

Thanks all for your inputs, however which i wanted to do in one step unfortunately not working and have to divide in many.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 01, 2013 12:47 pm
Reply with quote

If you use SORT instead of REPRO you will get a faster "copy" to the PS and you can use FINDREP at the same time.

Delete/Define only if necessary.

Use SORT to copy the modified PS to the RRDS.

If you want fewer steps, write a program. Ensure that it runs faster than the above solution.
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 Add condition to a FINDREP SORT card DFSORT/ICETOOL 4
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 CVDA value for RRDS VSAM dataset. CICS 2
No new posts z/vm installation problem All Other Mainframe Topics 0
Search our Forums:

Back to Top