IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need help with a PDS to GDG copy


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 3:10 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Apr 28, 2011 3:55 am
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Apr 28, 2011 4:09 am
Reply with quote

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
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 4:10 am
Reply with quote

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
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 4:30 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Apr 28, 2011 4:32 am
Reply with quote

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
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 4:50 am
Reply with quote

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
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 4:55 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Apr 28, 2011 4:59 am
Reply with quote

Hi,

you need to show the JCL used and output from run.


Gerry
Back to top
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 5:00 am
Reply with quote

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
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 5:01 am
Reply with quote

There is a 2nd DCB statement that was commented out when I ran the job.
Back to top
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 5:02 am
Reply with quote

Tried DSORG= PS, PO
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Apr 28, 2011 5:12 am
Reply with quote

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
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 5:15 am
Reply with quote

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
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 5:17 am
Reply with quote

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
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 5:23 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Apr 28, 2011 5:26 am
Reply with quote

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
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 5:30 am
Reply with quote

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
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 5:33 am
Reply with quote

I'll let you kn ow if your JCL solved my problem. Have a feeling that it will.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Apr 28, 2011 5:34 am
Reply with quote

Hi Darrell,

directory blocks are part of the space parameter

eg. SPACE=(TRK,(5,5,10),RLSE)


Gerry
Back to top
View user's profile Send private message
Darrell Wilson

New User


Joined: 07 Apr 2011
Posts: 14
Location: United States

PostPosted: Thu Apr 28, 2011 5:42 am
Reply with quote

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
View user's profile Send private message
hailashwin

New User


Joined: 16 Oct 2008
Posts: 74
Location: Boston

PostPosted: Sat Apr 30, 2011 9:03 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
Search our Forums:

Back to Top