Append Data in all PDS member

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
hparthas
Member
Posts: 43
Joined: Thu Oct 21, 2010 11:17 pm

Append Data in all PDS member

Post by hparthas » Thu Dec 23, 2010 2:35 pm

Hi,

I have a requirement to append same text in all all members of a PDS dataset.

Is this possible to append data either as header or trailer in all members.

Can someone tell me how to proceed further in this.

Any help would be great.

Best Regards,
Harikrishnan

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Thu Dec 23, 2010 8:03 pm

Well, since you're talking about a PDS here, what's your approach going to be? If you could narrow it down a bit and let us know your basic plan for the process, maybe we could be of more help.

hparthas
Member
Posts: 43
Joined: Thu Oct 21, 2010 11:17 pm

Post by hparthas » Sat Dec 25, 2010 1:25 pm

Hi,

I have a PDS and that PDS contains around 700 members.

Now my requirement is to append a single record @ top and bottom of all members.

For Example:

PDS name : MYPDS.TEST.DEC23
1st member name : TEST001
2nd member name : TEST002
.
.
.
.
Last member name : TEST700

Below is the sample JCL which I in my 1st member and have shown before and after change details.

Before Change:

//JOBNAME JOB (U),TEST1,MSGCALSS=0,CLASS=0,NOTIFY=@
//
.
.
.
.
//*

After Change:

//* XXXXXXXXXX APPLICATION !!!!!!!!
//JOBNAME JOB (U),TEST1,MSGCALSS=0,CLASS=0,NOTIFY=@
//
.
.
.
.
//*
//* END OF PROCESSING!!!!!

Do let me know if you need any further informations.

Any help would be great !!!!

Best Regards,
Harikrishnan

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Tue Dec 28, 2010 12:45 am

A simple process:

Code: Select all

//S1       EXEC PGM=SORT
//SORTIN   DD   DISP=SHR,DSN=MYPDS.TEST.DEC23(TEST001)
//SORTOUT  DD   DSN=&&T1,DISP=(,PASS),UNIT=VIO,
//         SPACE=(CYL,(10,10))
//SYSOUT   DD   SYSOUT=*
//SYSIN    DD   *
  OPTION COPY
  OUTFIL HEADER1=('//* XXXXXXXXXX APPLICATION !!!!!!!!'),REMOVECC,
    TRAILER1=('//* END OF PROCESSING!!!!!')
/*
//*
//S2       EXEC PGM=SORT
//SORTIN   DD   DSN=&&T1,DISP=(OLD,DELETE)
//SORTOUT  DD   DISP=SHR,DSN=MYPDS.TEST.DEC23(TEST001)
//SYSOUT   DD   SYSOUT=*
//SYSIN    DD   *
  OPTION COPY
/*
//*

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

Post by Anuj Dhawan » Tue Dec 28, 2010 4:11 pm

FileAid, if available - can be considered as one of the choices.
Regards,
Anuj

hparthas
Member
Posts: 43
Joined: Thu Oct 21, 2010 11:17 pm

Post by hparthas » Tue Dec 28, 2010 4:43 pm

Thanks a lot MrSpock and Anuj Dhawan !!!!

This worked only for single PDS member, I have such 700 members in my PDS, in this case how can I acieve this.

Best Regards,
Harikrishnan

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Tue Dec 28, 2010 7:04 pm

Harikrishnan, I've asked you more than once to provide the details of how you want to do this, what you'll use, what software you might have available to help, what language(s) you might use, etc. So far you've provided nothing, so it's really hard to give you a response. Logically, to apply the exact same change to a bunch of members, I'd think you'd want to write a small ISPF Edit Macro and just call it once for each member you want to change. Quick, easy, efficient, but I don't know why you're not already considering that option.

Anyway, maybe you can consider this option (which I've already mentioned):

1. Convert the PDS to a sequential dataset (using IEBPTPCH).

2. Reformat the data, and add the HEADER and TRAILER records (using DFSORT).

3. Create the new PDS (using IEBUPDTE).

hparthas
Member
Posts: 43
Joined: Thu Oct 21, 2010 11:17 pm

Post by hparthas » Tue Dec 28, 2010 10:07 pm

MrSpock,

Thanks for your information, will try the above option.

As requested, below are the information's I have:

1) I need this to be done through Sort
2) I have Syncsort
3) I want the above SORT to be integrated for all 700 members in my PDS.

To be open, I've no knowledge in REXX, let me try through googling it....

Best Regards,
Harikrishnan

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Tue Dec 28, 2010 11:50 pm

hparthas wrote:To be open, I've no knowledge in REXX, let me try through googling it....
You never mentioned anything about Syncsort before, and I don't think I've mentioned REXX anywhere ...

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