dummy out the multiple dataset

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
vrdhrjnbb
Member
Posts: 10
Joined: Fri Jul 12, 2013 6:00 pm

dummy out the multiple dataset

Post by vrdhrjnbb » Wed Aug 28, 2013 10:56 pm

Dear all,

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

Note: The dataset should not be delete.

Thanks in advance.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Thu Aug 29, 2013 12:48 am

You need to show the JCL you have and what the modified JCL should look like.

I don't understand what you are asking.
Have a good one

User avatar
Gurugars
Active Member
Posts: 107
Joined: Sat Oct 23, 2010 2:17 pm
Location: Chennai,India.

Post by Gurugars » Thu Aug 29, 2013 10:13 am

Hi,

Please provide bit more clarity.

Do you want to empty out many datasets?

Thanks
Guru:-)

You're never fully dressed without a smile :)

vrdhrjnbb
Member
Posts: 10
Joined: Fri Jul 12, 2013 6:00 pm

Post by vrdhrjnbb » Fri Aug 30, 2013 2:39 pm

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

User avatar
vasanthz
Member
Posts: 9
Joined: Tue Aug 27, 2013 7:35 pm
Location: Chennai

Post by vasanthz » Fri Aug 30, 2013 3:22 pm

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.
Vasanth.S

Please support http://my.charitywater.org/pewdiepie

User avatar
Gurugars
Active Member
Posts: 107
Joined: Sat Oct 23, 2010 2:17 pm
Location: Chennai,India.

Post by Gurugars » Fri Aug 30, 2013 3:27 pm

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.
Guru:-)

You're never fully dressed without a smile :)

vrdhrjnbb
Member
Posts: 10
Joined: Fri Jul 12, 2013 6:00 pm

Post by vrdhrjnbb » Fri Aug 30, 2013 5:35 pm

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

User avatar
vasanthz
Member
Posts: 9
Joined: Tue Aug 27, 2013 7:35 pm
Location: Chennai

Post by vasanthz » Fri Aug 30, 2013 8:55 pm

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 :-)
Vasanth.S

Please support http://my.charitywater.org/pewdiepie

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Sat Aug 31, 2013 10:39 pm

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:
Regards,
Anuj

User avatar
vasanthz
Member
Posts: 9
Joined: Tue Aug 27, 2013 7:35 pm
Location: Chennai

Post by vasanthz » Mon Sep 02, 2013 1:39 pm

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,
Vasanth.S

Please support http://my.charitywater.org/pewdiepie

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Mon Sep 02, 2013 7:39 pm

vasanthz wrote:Hello Anuj, nice to see you here :-)
I've nasty habit of getting here and there...:P
Regards,
Anuj

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Wed Sep 04, 2013 1:18 am

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.
Have a good one

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others