Writing to the same generation file from one ICETOOL



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Writing to the same generation file from one ICETOOL

Postby olivermf » Wed Jul 06, 2011 7:34 pm

Hello again,

I have a question regarding the use of ICETOOL if I want to write to a generation dataset the first time with DISP=SHR and the second time with DISP=MOD.

If I use a "normal" PO-File this works without any problems:

//IEFNULL-Step to create new OUT.TEST5210(+1)

//ICETOOL EXEC PGM=ICETOOL                         
//TOOLMSG   DD SYSOUT=A                           
//DFSMSG    DD SYSOUT=A                           
//IN1       DD DSN=FILE1.DATASET(+0),DISP=SHR
//IN2       DD DSN=FILE2.DATASET(+0),DISP=SHR
//OUT1      DD DSN=OUT.TEST5210(+1),DISP=SHR         
//OUT2      DD DSN=OUT.TEST5210(+1),DISP=MOD         
//TOOLIN    DD *                                   
 COPY FROM(IN1) TO(OUT1) USING(CTL1)               
 COPY FROM(IN2) TO(OUT2) USING(CTL2)               
//CTL1CNTL  DD *                                   
 SORT FIELDS=COPY                                 
//CTL2CNTL  DD *                                   
 INCLUDE COND=(1728,7,CH,NE,C'       ')           
 SORT FIELDS=COPY                                 


When I try this the job hangs several minutes until I manually stop it...
What do I have to do?

Thank you very much!

Regards

Oliver
olivermf
 
Posts: 53
Joined: Tue Feb 08, 2011 4:28 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Writing to the same generation file from one ICETOOL

 

Re: Writing to the same generation file from one ICETOOL

Postby Robert Sample » Wed Jul 06, 2011 7:42 pm

When I try this the job hangs several minutes until I manually stop it...
What do I have to do?
Do not use a GDG -- quite simple, really.

Find the JCL Reference manual and read up on the enqueue that is done on the GDG base name whenever you use a relative generation reference.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: Writing to the same generation file from one ICETOOL

Postby olivermf » Thu Jul 07, 2011 10:23 am

Robert Sample wrote:Do not use a GDG -- quite simple, really.


Hello Robert,

thank you for your fast reply.

Well... not to use the GDG is not an option.
I need to use it. The question is just how...

How would be this solution:

First I write into a new created temporary file &&temp and then in step 2 in &&temp with DISP=MOD.
In a third step I simply copy from &&temp in a new created generation of my GDG-file.

Is there a better solution?

Regards

Oliver
olivermf
 
Posts: 53
Joined: Tue Feb 08, 2011 4:28 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Writing to the same generation file from one ICETOOL

Postby MrSpock » Thu Jul 07, 2011 11:04 am

Why can't you have just one DD statement, pointing to the new generation of the GDG, with a DISP=MOD disposition?

//ICETOOL EXEC PGM=ICETOOL                         
//TOOLMSG   DD SYSOUT=*                           
//DFSMSG    DD SYSOUT=*                     
//IN1       DD DSN=FILE1.DATASET(0),DISP=SHR
//IN2       DD DSN=FILE2.DATASET(0),DISP=SHR
//OUT       DD DSN=OUT.TEST5210(+1),DISP=(MOD,CATLG,DELETE),UNIT=....,
//TOOLIN    DD *                                   
COPY FROM(IN1) TO(OUT)   
COPY FROM(IN2) TO(OUT) USING(CTL2)     
/*                                     
//CTL2CNTL  DD *                                   
  INCLUDE COND=(1728,7,CH,NE,C' ')
/*                             
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Writing to the same generation file from one ICETOOL

Postby olivermf » Thu Jul 07, 2011 11:10 am

Well... honestly I thought this would not be possible...
Is Icetool creating a new generation of the file, if I do not use DISP=(NEW,...)?

I'll try that! :-)
olivermf
 
Posts: 53
Joined: Tue Feb 08, 2011 4:28 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Writing to the same generation file from one ICETOOL

Postby olivermf » Thu Jul 07, 2011 2:25 pm

Thank you MrSpock!
This happens to be just the solution I was looking for!

Regards,

Oliver
olivermf
 
Posts: 53
Joined: Tue Feb 08, 2011 4:28 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Writing to the same generation file from one ICETOOL

Postby dick scherrer » Thu Jul 07, 2011 10:43 pm

Hello,

You need to understand that neither this question nor the solution has anything to do with ICETOOL (or any other utility). . .

If this is not completely clear (it is NOT sufficient that it merely "works"), you need to review just how JCL and Generations work. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Writing to the same generation file from one ICETOOL

Postby olivermf » Thu Jul 07, 2011 10:54 pm

Hello Dick,

until today I had the problem that I didn't have GDG-files - simply because I did not know how to create them.
But now I can use my own GDG files and learn more about them.

I will read more about it in the JCL and MVS documentations and hope to understand better.

I'm not sure, but I think I once tried to create a new file in a JCL with DISP=(MOD,CATLG,DELETE) (not GDG, simple file) and this did not work.
So I thought a new generation of a GDG could only be created with (NEW,CATLG,DELETE), too.

I am very new to mainframes, so I am always happy about every possible hint.

Regards,

Oliver
olivermf
 
Posts: 53
Joined: Tue Feb 08, 2011 4:28 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Writing to the same generation file from one ICETOOL

Postby dick scherrer » Thu Jul 07, 2011 11:04 pm

Hi Oliver,

I am very new to mainframes, so I am always happy about every possible hint.
When you have questions, someone is usually here (or soon will be :) ).

Sometimes, one may get a little "beat up", but don't let that discourage you ;)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Writing to the same generation file from one ICETOOL

Postby olivermf » Thu Jul 07, 2011 11:10 pm

Hi Dick,

thank you, it doesn't discourage me.

I'm learning more from day to day ;-)

Regards,

Oliver
olivermf
 
Posts: 53
Joined: Tue Feb 08, 2011 4:28 pm
Has thanked: 3 times
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post