View previous topic :: View next topic
|
Author |
Message |
Lisa Christina
New User
Joined: 09 Jul 2008 Posts: 6 Location: Portland, Oregon
|
|
|
|
I would like to use the IDCAMS REPRO command to copy the first record in the file and then the last 500 records in the file. How do I accomplish that task?
Anybody have JCL examples?
Can you use more than one FROMKEY & TOKEY in the REPRO command?
Thanks. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
Lisa Christina
New User
Joined: 09 Jul 2008 Posts: 6 Location: Portland, Oregon
|
|
|
|
Thank you...it worked perfectly.
REPRO INFILE (INFILE) -
OUTFILE (OUTFILE) -
FROMKEY (20080801) -
TOKEY (99999999) |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi Lisa,
Thanks for posting the solution..
- Ad |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi Anuj,
I dont know whether I am missing something here.
Code: |
REPRO INFILE (INFILE) -
OUTFILE (OUTFILE) -
FROMKEY (20080801) -
TOKEY (99999999) |
Will this copy the first record and then the last 500 records from the input file.
Thanks,
Arun |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Arc,
Quote: |
Will this copy the first record and then the last 500 records from the input file. |
Even i doubt this. I don't think this REPRO command would work for OP's requirement.
Lisa,
Could you please let us know the exact solution? |
|
Back to top |
|
|
Lisa Christina
New User
Joined: 09 Jul 2008 Posts: 6 Location: Portland, Oregon
|
|
|
|
The solution:
It copied records from key "20080801" to key "99999999" (which is the last record in the file).
It DID NOT copy the first record, which I really wanted. But the first record was a dummy record (all low-values) so I just inserted one when I edited the test file. (I know, I cheated but I needed to get my testing done!)
I forgot to try if I could use more than one FROMKEY and TOKEY in my REPRO statement. I couldn't find that information in the docs Aaru referred me to. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello Lisa and welcome to the forums,
Quote: |
I forgot to try if I could use more than one FROMKEY and TOKEY in my REPRO statement |
If you need to do something like this again, you might run multiple steps and mod the output from steps 2 - n onto the back of the output from step1. |
|
Back to top |
|
|
Lisa Christina
New User
Joined: 09 Jul 2008 Posts: 6 Location: Portland, Oregon
|
|
|
|
Okay I'll try that approach next time.
Thanks! |
|
Back to top |
|
|
|