View previous topic :: View next topic
|
Author |
Message |
Guest
|
|
|
|
Hi All,
I found a job using ICEGENER to copy 2 files into a single file. In this process it uses 1 input file itself as the output file in DISP =SHR.
Could someone explain why the job doesnot give a JCL error in this case.
Also the job gives different output if i change the order of files in input
File 1 : 10 records
File 2 : 15 records
Scenario 1
------------------
Code: |
//STEP020 EXEC PGM=ICEGENER
//SYSUT1 DD DSN=File1,DISP=SHR
// DD DSN=File2,DISP=SHR
//SYSUT2 DD DSN=File2,DISP=SHR
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
|
Output : 10 records
Scenario 2
-----------------------
Code: |
//STEP020 EXEC PGM=ICEGENER
//SYSUT1 DD DSN=File1,DISP=SHR
// DD DSN=File2,DISP=SHR
//SYSUT2 DD DSN=File1,DISP=SHR
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
|
Output : 25 records
Could someone explain how this happens ?
Thanks |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
As to your first question, why would you expect a JCL error? Contemplate the nature of ENQs.
As to your second question, your "sample" JCL (which, of course, could never actually run) is completely unlike what you describe. Re-read it, understand what you actually posted, and you will understand what is happening. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
For the sake of experiment, I tried this out.
Run 1
FILE1 + FILE2 Written to FILE2
Run2
FILE2 + FILE1 Written to FILE2
Run3
FILE1 + FILE2 Written to FILE1
In every case the run times took 1 second and the number of records copied were always exactly the same, the sum of records in FILE1 & FILE2.
In your post you say that you varied the sequence of input files but your post shows that the output file is the only variation, hence my Run3. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Well, it's been said before:
Quote: |
You SHOULD NOT use the same data set for SORTIN and SORTOUT for a COPY for the reason that we are doing parallel read/write. Depending on how the data is arranged, you may get away with it, but you're taking a risk. We can't guarantee that you won't lose records. So just don't do it. |
|
|
Back to top |
|
|
|