View previous topic :: View next topic
|
Author |
Message |
NAGARJUN CARALAPATI
New User
Joined: 09 Oct 2007 Posts: 22 Location: chennai.India
|
|
|
|
Could any one let me know how to copy the contents of all the members inside the PDS(without listing out the members inside the PDS in the job) to a flat file.
Where the flat file as ouput should consist of all the data inside the PDS members to be concatenated inside.
Could any one come up with a sample job to do this !! |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
NAGARJUN CARALAPATI
New User
Joined: 09 Oct 2007 Posts: 22 Location: chennai.India
|
|
|
|
Could you please send me a sample program which uses IEBPTPCH. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
why not use the 3.3 panel? |
|
Back to top |
|
|
NAGARJUN CARALAPATI
New User
Joined: 09 Oct 2007 Posts: 22 Location: chennai.India
|
|
|
|
3.3 is for copy 'pds to pds' or 'ps to ps' but not for 'all pds member to a single ps'. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Huh??
ISPF 3.3 is "3 Move/Copy Move, or copy members or data sets", which can be PDS to PDS, PDS to SEQ, SEQ to PDS. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
naga,
Quote: |
3.3 is for copy 'pds to pds' or 'ps to ps' but not for 'all pds member to a single ps'. |
Are you sure?
Quote: |
dbzTHEdinosauer wrote:
why not use the 3.3 panel? |
Yes, 3.3 can be used to copy PDS to PS. |
|
Back to top |
|
|
NAGARJUN CARALAPATI
New User
Joined: 09 Oct 2007 Posts: 22 Location: chennai.India
|
|
|
|
Thanks kevin,
3.3 option worked. I was able to copy all the content of the PDS members to a single flat file.
Thank you !!!!!! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
3.3 is for copy 'pds to pds' or 'ps to ps' but not for 'all pds member to a single ps'. |
WRONG, I just tested it,
it works, it will simply copy to a sequential datasets all the members selected - without any separator.
Just like concatenating each member as a dd of a IEBGENER step
It might be useless if used for pds containing source programs,
but if the pds contained just data to be concatenated, it will work |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I thought your original requirement was to be able do this in batch without having to code a program. No? |
|
Back to top |
|
|
NAGARJUN CARALAPATI
New User
Joined: 09 Oct 2007 Posts: 22 Location: chennai.India
|
|
|
|
But before using this 3.3 option i created an empty flat file and then gave for 3.3 option to copy.
If we didnt define before 3.3, then it is trying to create a new PDS and copy all the content to those PDS members to new PDS members. |
|
Back to top |
|
|
NAGARJUN CARALAPATI
New User
Joined: 09 Oct 2007 Posts: 22 Location: chennai.India
|
|
|
|
Yes,
our original requirement was to be able do this in batch without having to code a program. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
If we didnt define before 3.3, then it is trying to create a new PDS and copy all the content to those PDS members to new PDS members. |
Maybe You were pounding too fast on Your keyboard,
or You were not looking at the panel' s text
When You specify a non existent dataset, ISPF will ask
how to allocate the target dataset,
a reply with "1" will allocate with the same caractheristics of the source,
a reply with "2" will ask for the allocation parameters |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
If you have FILEAID here's an example that works
//UPD EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DSN=INPUT.PDS,
// DISP=SHR
//DD01O DD DSN=OUTPUT.DSN,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(500,100),RLSE)
//SYSIN DD *
*
$$DD01 COPY MEMBERS=ALL,OUT=0 |
|
Back to top |
|
|
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
Hi,
I want to do exactly reverse!!!
I want to copy the flat file to PDS member.
What is a procedure to do this?
Thanks, |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
Is there a reason you replied to an old message instead of creating a new one?
Do you want to copy the flat file to one PDS member. If so you may use 3.3, IEBGENER, ICEGENER, IDCAMS, or other programs.
If you want the flat file to be split into several PDS members, then we need to know how to detect when one member ends and the next starts. It could easily help to know how this file was created. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
It depends on how the flat file was created. Without knowing how it was created we can to tell you how to restore it |
|
Back to top |
|
|
rahulbank
New User
Joined: 25 Sep 2008 Posts: 66 Location: Bengaluruuuuuu
|
|
|
|
One has other options such as choose the members to be copied the columns to be copied and many...
//IEBPTPCH EXEC PGM=IEBPTPCH
//SYSUT1 DD DSN=file.file1,DISP=SHR
//SYSUT2 DD DSN=file.file2,DISP=(OLD,CATLG,DELETE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT TYPORG=PO,MAXFLDS=1
RECORD FIELD=(80) |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
rahulbank, the post was for going from a flat file to a PDS. Your JCL is going from a PDS to a flat file. Exactly how does this help, since you're doing completely the opposite of what was asked?
sagar, as was pointed out by earlier posts, there's a lot of possible ways to do what you're asking but the tool used depends partly upon the flat file's characteristics. Unless you provide us more, all we can do is say yes it can be done but the specific tool depends upon the file. |
|
Back to top |
|
|
rahulbank
New User
Joined: 25 Sep 2008 Posts: 66 Location: Bengaluruuuuuu
|
|
|
|
This was the original question:
Could any one let me know how to copy the contents of all the members inside the PDS(without listing out the members inside the PDS in the job) to a flat file.
My intention was just to help the person who has asked the original question incase he has still not found the solution to this. |
|
Back to top |
|
|
rahulbank
New User
Joined: 25 Sep 2008 Posts: 66 Location: Bengaluruuuuuu
|
|
|
|
Sorry Now I realize the oringinal question was asked way back in time...
Apologies.... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
edit the pds member, enter 'A' at the line after which you want the new data positioned and enter COPY on the commandline. Depress ENTER.
fill out the panel. |
|
Back to top |
|
|
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
Actually I tried using IDCAMS as follows:
Code: |
//PS010 EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//INFILE DD DSN=PRGSD1.PCDATF.ADHERIS.TEMP,DISP=SHR
//OUTFILE DD DSN=PRGSD1.CTL.LIB(PCAD004Z),
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000),
// UNIT=CARDA,
// SPACE=(CYL,(500,500),RLSE) |
but it says 'PRGSD1.CTL.LIB' already exists.
I want tp copy the contents of flat file into the member PCAD004Z, |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Use DISP=OLD for guaranteed results, or DISP=SHR if you're sure nobody else can be updating the PDS at the same time. DISP applies to the data set, not to the member -- as many have discovered the hard way by attempting to code DISP=(OLD,DELETE) to get rid of a member (the data set goes away instead). |
|
Back to top |
|
|
|