View previous topic :: View next topic
|
Author |
Message |
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
Hello, how are you? Im using the next repro, with 2 ps files.
//SORTIN DD DSN=FILE1,DISP=SHR
//SORTOUT DD DSN=FILE2,DISP=SHR
//SYSIN DD *
REPRO INFILE (SORTIN) OUTFILE (SORTOUT) REPLACE
The files are:
Sortin
A
B
C
Sortout
A
B
C
D
E
When I run the repro I see that the sortout file only keeps
A
B
C
How can I do to keep all the data and not only what paired?
Thank you again. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1329 Location: Bamberg, Germany
|
|
|
|
See description of REPLACE, and REPRO in general. |
|
Back to top |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
Joerg.Findeisen wrote: |
See description of REPLACE, and REPRO in general. |
I searched but there is no much info, I cant find no idcams guide and in www.mainframestechhelp.com/utilities/idcams/repro.htm neither.
Is there a way trhough repro to do the thing I want ?
thanks |
|
Back to top |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
I just wanted to know if there is a a way to achieve this using repro or merge. I tried several times but I cant achieve the desired result. |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Would a cluster defined with REUSE behave this way? |
|
Back to top |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
dneufarth wrote: |
Would a cluster defined with REUSE behave this way? |
I will try it tomorrow, I used a ps file. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2133 Location: USA
|
|
|
|
Ali_gezer wrote: |
Hello, how are you? Im using the next repro, with 2 ps files.
Code: |
//SORTIN DD DSN=FILE1,DISP=SHR
//SORTOUT DD DSN=FILE2,DISP=SHR
//SYSIN DD *
REPRO INFILE (SORTIN) OUTFILE (SORTOUT) REPLACE |
The files are:
Sortin
Sortout
When I run the repro I see that the sortout file only keeps
How can I do to keep all the data and not only what paired?
Thank you again. |
Can you please clarify: where the two records, D, and E, can appear in SORTOUT when missing from SORTIN???
P.S.
Remember, you still need to RTFM about SORT
P.P.S.
REPRO in either IDCAMS or SORT has nothing to do with neither paired, nor unpaired records. Read about SORT, not IDCAMS |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Perhaps I'm confused by REPRO and ddnames of SORTxxx
If I recall, IDCAMS REPRO to a KSDS (with no ALTindex) should replace individual records in output with input records having a matching key.
It will take another utility/program to achieve that in a PS dataset. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Cleaned up unwanted posts .. please stick to the forum rules.
However to achieve what you want can be done easily using DFSORT/SYNCSORT using JOINKEYS . |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1329 Location: Bamberg, Germany
|
|
|
|
Code: |
REPLACE
When a key-sequenced data set (other than a catalog) is copied, each
source record with a key matching a target record's key replaces the
target record. Otherwise, the source record is inserted into its
appropriate place in the target cluster.
When a relative record data set is copied, each source record with a
relative record number that identifies a data record (rather than an
empty slot) in the target data set replaces the target data record.
Otherwise, the source data record is inserted into the empty slot its
relative record number identifies. |
depending on the VSAM type, this could also apply:
Code: |
REUSE
specifies that the target data set, specified with OUTFILE or
OUTDATASET, is opened as a reusable data set whether or not it was
defined as reusable with the REUSE parameter. (See the DEFINE CLUSTER
command description.) If the data set was defined with REUSE, its
high-used relative byte address (RBA) is reset to zero (that is, the
data set is effectively empty) and the operation proceeds. When you
open a reusable data set with the reset option, that data set cannot
be shared with other jobs.
If REUSE is specified and the data set was originally defined with
the NOREUSE option, the data set must be empty; if not, the REPRO
command ends with an error message.
NOREUSE
specifies that records are written at the end of an entry-sequenced
data set. (OUTFILE or OUTDATASET must identify a nonempty data set.) |
|
|
Back to top |
|
|
|