View previous topic :: View next topic
|
Author |
Message |
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
I need to copy the contents of a PDS file into a GDG that will allow the members to be edited. I have tried IEBCOPY, IEBGENER, ICETOOL, FILEMGR, SORT, IDCAMS and IEBPTPCH and combinations of both.
This was my last attempt using a combo of IEBPTPCH and SORT, it catalogs the data set but as a flat file. Anyone see anything that I am doing inccorectly.
//STEP020 EXEC PGM=IEBPTPCH,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=JOBTRAC.STAGING.SCLLIB1,DISP=SHR
//SYSUT2 DD DSN=X580226.DUMP.OF.MY.PDS.PS,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(5,5),RLSE),
// UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSIN DD *
PUNCH TYPORG=PO
/*
//STEP030 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//REPORT1 DD SYSOUT=*
//SORTIN DD DSN=X580226.DUMP.OF.MY.PDS.PS,DISP=SHR
//SORTOUT DD SN=JOBTRAC.STAGING.SCLLIB.BKUP+1),
// DISP=(NEW,CATLG,CATLG),UNIT=SYSDA,SPACE=(CYL,(2,2)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SORTWK01 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK02 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK03 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
/* |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
what exactly are you trying to do ? Are you trying to take a copy/backup of a PDS, in other words create another PDS and copy the contents of PDS1 to PDS2.
I'm certainly unsure what you are requesting.
Gerry |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
Asked and answered years ago.
ETA: That JCL isn't creating a PDS and has at least one syntax error in it that would prevent it from running anyway. I think that you need to 'fess up and tell us what you're really trying to do and what you've really done. |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
I am trying to copy the PDS into a GDG that will be essentially a PDS like data set, allow editing, copies, moves of individual member. Yes this is for backup reasons. if a restore of a member is needed we can pull it back into the original library. |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
Akatsukami, Wouldn't have asked the question if I hadn't exhausted all of my available resources. Searched the site high and low for this information and it never popped out. Thanks for pointing me at the correct location. I'll see what I can come up with after I read these documents. Based on a brief look, think the whole process may have to be re-evaluated and a different approach investigated. Thanks again! |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
i would opt for IEBCOPY, example below
Code: |
//STEP01 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(2,1))
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(2,1))
//IN DD DSN=input-dsn,DISP=SHR
//OUT DD DSN=output-dsn,
// DISP=(,CATLG,DELETE),
// LIKE=input-dsn
//SYSIN DD *
COPY INDD=IN,OUTDD=OUT
/* |
Gerry
Gerry |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
My JCL runs to completion with all condition code zero's but the output GDG is a flat file that just lists the pds members. So I am not sure what syntax error you are seeing. I am not that familar with either IEBPTPCH or SORT. When I used FILEMGR the data set was also created but again as a listing not an edit friendly data set. IEBCOPY, IEBGENER, ICETOOL and IDCAMS are all failing with a cond code 12 wrong length record on the input file, I have tried to use quickref for a fix but doesn't provide much info and I have always been on the other side of these types of abends so I'm not sure what needs to be done or how to correct it. Never used ICETOOL until I began this project. Have used the other utilities but it has been a while. Hope this counts as a confession, not sure what else to say. |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
gcicchet, I tried using IEBCOPY and the job keeps failing on a wrong length record on the input dsn. I don't know enough about this type of error to know how to fix it or what is causing it. But thanks I appreciate the info. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
you need to show the JCL used and output from run.
Gerry |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
Gerry, This is the IEBCOPY JCL I was using:
//STEP020 EXEC PGM=IEBCOPY,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//SYSUT3 DD UNIT=SYSDA,SPACE=(TRK,(90,90))
//SYSUT4 DD UNIT=SYSDA,SPACE=(TRK,(90,90))
//IN DD DSN=JOBTRAC.STAGING.SCLLIB1,DISP=SHR
//OUT DD DSN=JOBTRAC.STAGING.SCLLIB.BKUP(+1),
// DISP=(,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(5,5),RLSE),
// DCB=(RECFM=FB,LRECL=80,
// DSORG=PS,BLKSIZE=0,BUFNO=30)
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=6080)
//SYSIN DD *
COPY INDD=((IN,R)),OUTDD=OUT
// |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
There is a 2nd DCB statement that was commented out when I ran the job. |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
Tried DSORG= PS, PO |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Darrel,
you need to provide the information requested.
1. exact JCL you ran
2. all output including messages
3. what is the LRECL amd RECFM of the input PDS.
Also when creating a PDS, you need to specify directory blocks
Gerry |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
I did get a couple of the IEBCOPY jobs to complete and catalog a data set. But when I tried to edit the data set I got and error "INVALID DSORG". I have run this job so many times and tried so many different PGMS that I am confused on what went wrong. The job that executed IEBGENER were failing with the CC12 wrong length record on the input file. Sorry I am so messed up. Been working on this for a few days and getting really frustrated. |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
Data Set Name . . . : JOBTRAC.STAGING.SCLLIB1
General Data Current Allocation
Volume serial . . . : SFTP06 Allocated cylinders : 70
Device type . . . . : 3390 Allocated extents . : 1
Organization . . . : PO Maximum dir. blocks : 500
Record format . . . : FB
Record length . . . : 80
Block size . . . . : 6080 Current Utilization
1st extent cylinders: 70 Used cylinders . . : 1
Secondary cylinders : 5 Used extents . . . : 1
Used dir. blocks . : 1
Creation date . . . : 2011/04/11 Number of members . : 5
Referenced date . . : 2011/04/27
Expiration date . . : ***None*** |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
Gerry, Thank you so much for trying to help me. I saw the need for directory blocks in some of my abend messages. How do I specify that in my DCB parm? |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
why don't you use the JCL I provided.
Also you must provide the SYSOUT from the the job you are running.
Gerry |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
Gerry, The sysout goes to SAR, I have to restore it. It takes a while to get it reloaded. I will make a copy of your JCL and try that out. I'm at work and have to get busy doing something else (sorry). I do not want to take up any more of your time. I really thank you for all the effort. |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
I'll let you kn ow if your JCL solved my problem. Have a feeling that it will. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Darrell,
directory blocks are part of the space parameter
eg. SPACE=(TRK,(5,5,10),RLSE)
Gerry |
|
Back to top |
|
|
Darrell Wilson
New User
Joined: 07 Apr 2011 Posts: 14 Location: United States
|
|
|
|
Gerry,
Decided to try one last time to get this to work. You are a genius, your JCL worked like a charm. I can not thank you enough. I have been struggling with this for several days. You are the Man! |
|
Back to top |
|
|
hailashwin
New User
Joined: 16 Oct 2008 Posts: 74 Location: Boston
|
|
|
|
There should be something that you are missing in what you tried initially. Did you actually try giving the GDG as the output file in the IEBPTPCH step itself. I tried it and did not encounter an issue.
Code: |
//STEP1 EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=PDS,DISP=SHR ->> Your PDS
//SYSUT2 DD DSN=GDG(+1), ->> Your GDG
// DISP=(NEW,CATLG,CATLG),
// MGMTCLAS=WORKW,
// SPACE=(TRK,(10,10),RLSE),
// DCB=(RECFM=FB)
//SYSIN DD *
PUNCH TYPORG=PO
/*
|
If this did not work, please show your SYSOUT message..
If you are using FILEAID, this should also work..
Code: |
//STEP010 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DSN=PDS,DISP=SHR ->> Your PDS
//DD01O DD DSN=GDG(+1), ->> Your GDG
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(50,10),RLSE)
//SYSIN DD *
*
$$DD01 COPY MEMBERS=ALL,OUT=0
//*
|
Thanks,
Ashwin. |
|
Back to top |
|
|
|