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

ICEGENER to copy 2 files into a single file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Guest







PostPosted: Fri Feb 26, 2010 4:37 pm
Reply with quote

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

PostPosted: Fri Feb 26, 2010 5:01 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 26, 2010 5:27 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Feb 26, 2010 5:35 pm
Reply with quote

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
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top