Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Problem with FINDREP on RRDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject:
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

Senior Member


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

PostPosted: Wed Jul 31, 2013 7:34 pm    Post subject:
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: 1715
Location: UK

PostPosted: Wed Jul 31, 2013 7:39 pm    Post subject:
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    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7233

PostPosted: Wed Jul 31, 2013 8:22 pm    Post subject: Reply to: Problem with FINDREP on RRDS
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

Site Director


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

PostPosted: Wed Jul 31, 2013 10:13 pm    Post subject:
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    Post subject: Reply to: Problem with FINDREP on RRDS
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

Site Director


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

PostPosted: Wed Jul 31, 2013 11:33 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7233

PostPosted: Thu Aug 01, 2013 12:01 am    Post subject: Reply to: Problem with FINDREP on RRDS
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7233

PostPosted: Thu Aug 01, 2013 12:47 pm    Post subject: Reply to: Problem with FINDREP on RRDS
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    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 Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts Problem with GETMAIN command amitc23 CICS 6 Thu Sep 01, 2016 1:01 pm
No new posts TXT2PDF problem - printing @ in PDF vipul65 All Other Mainframe Topics 9 Thu Aug 25, 2016 12:48 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us