Page 1 of 1

dummy out the multiple dataset

Posted: Wed Aug 28, 2013 10:56 pm
by vrdhrjnbb
Dear all,

Can you please guide me to dummy out multiple dataset using JCL.

Note: The dataset should not be delete.

Thanks in advance.

Posted: Thu Aug 29, 2013 12:48 am
by DikDude
You need to show the JCL you have and what the modified JCL should look like.

I don't understand what you are asking.

Posted: Thu Aug 29, 2013 10:13 am
by Gurugars
Hi,

Please provide bit more clarity.

Do you want to empty out many datasets?

Thanks

Posted: Fri Aug 30, 2013 2:39 pm
by vrdhrjnbb
Hi,

Yes Guru, I want to dummy out many dataset.

Dikduke and Guru please consider the below scenario.

10 dataset have to concatenate into GDG and that GDG is the input to the program. If the program runs successfully, at last all the 10 dataset should be dummied out (empty) to avoid the repeat records next time when interface trigger input to that 10 dataset.

Using which utility I can do it? help me on this. :?:

Thanks

Posted: Fri Aug 30, 2013 3:22 pm
by vasanthz
Hello,

Assuming the files that need to be emptied are FB, LRECL 80.
You could try this below code,

Code: Select all

//STEP0010 EXEC PGM=SORT                               
//SORTIN   DD DUMMY,DCB=(LRECL=80,BLKSIZE=0,RECFM=FB)  
//OUT1     DD DSN=WELLS.FILE.TO.BE.EMPTIED1,DISP=OLD        
//OUT2     DD DSN=WELLS.FILE.TO.BE.EMPTIED2,DISP=OLD        
//OUT3     DD DSN=WELLS.FILE.TO.BE.EMPTIED3,DISP=OLD  
.
.
.
//OUT10 DD DSN=WELLS.FILE.TO.BE.EMPTIED10,DISP=OLD
      
//SYSOUT   DD SYSOUT=*                                 
//SYSUDUMP DD SYSOUT=*                                 
//SYSIN    DD *                                        
   SORT FIELDS=COPY                                    
   OUTFIL FNAMES=(OUT1,OUT2,OUT3.....OUT10)                      
//*        


Hope it helps.

Posted: Fri Aug 30, 2013 3:27 pm
by Gurugars
Hi,

Have you tried something on this? if yes, please let us know what is the difficulty that you have faced in that.

This is easiest one with sort copy option. Please try.


Thanks.

Posted: Fri Aug 30, 2013 5:35 pm
by vrdhrjnbb
Vasanth/Gure- Its working fine, as per my requirement.

Thanks a lot :)

There is any other alternative way for this? If yes means, Please post that also.

Thanks,
Varadhu

Posted: Fri Aug 30, 2013 8:55 pm
by vasanthz
Hello,
This one was the simplest IMO.
There are a lot of other ways.. too many to post them all here.
Upto you to search for them :-)

Posted: Sat Aug 31, 2013 10:39 pm
by Anuj Dhawan
Do you want to empty out many datasets?
vrdhrjnbb wrote:Yes Guru, I want to dummy out many dataset.
DUMMY and empty are two different concepts - did I miss something... :roll:

Posted: Mon Sep 02, 2013 1:39 pm
by vasanthz
Hello Anuj, nice to see you here :-)
DUMMY and empty are two different concepts - did I miss something...
Yup the TS seems to have mixed them up. I assumed the requirement was the empty the file and posted a snippet.

Regards,

Posted: Mon Sep 02, 2013 7:39 pm
by Anuj Dhawan
vasanthz wrote:Hello Anuj, nice to see you here :-)
I've nasty habit of getting here and there...:P

Posted: Wed Sep 04, 2013 1:18 am
by DikDude
From what has been explained by TS, i believe there is at least some inconsistency. . .

What will happen with these files after they are "empty"?

Why empty them at all?

Obviously there is something i am missing.