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
 

 

ICEGENER to copy 2 files into a single file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Guest







PostPosted: Fri Feb 26, 2010 4:37 pm    Post subject: ICEGENER to copy 2 files into a single file
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: 1746
Location: Bloomington, IL

PostPosted: Fri Feb 26, 2010 5:01 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 26, 2010 5:27 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Feb 26, 2010 5:35 pm    Post subject: Reply to: ICEGENER
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm


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