Posted: Tue May 25, 2004 6:13 am Post subject: Copy files where the entrance can be in many files
Hello,
i need to copy one member of a file. The problem is that member could be in 4 differents files.
For example: i need to copy the member XXXX and this member can be in FILEA or FILEB or FILEC or FILED.
Imagine, for example a REPRO where the entrance is:
If the utility can not find the member in FILEA, it doesn't abend, it continue finding the member into FILEB, etc...
When the utility finds the member, it executes the copy and finishes.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Tue May 25, 2004 6:39 am Post subject:
Monaco,
If you have file-aid at your shop then the following JCL will give you the desired results. Just concatenate all the PDS to the DD name and file-aid will automatically search for the member.
--------------------------------------------------------------------------
DD01 DSN=AIS.S2DEVE1B.COPY OPENED AS PO,
RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=MONA09
DD01O DSN=RSA174.KTPLCW00 OPENED AS PS,
RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=MONA09
$$DD01 COPY MEMBER=KTPLCW00 0028000
ER048-OPEN ERROR 780-01 WAS ENCOUNTERED ON DD01
.....SKIPPING TO NEXT $$DD CARD RC=4
0 RECORDS WRITTEN TO DD01O-RSA174.KTPLCW00
VOL=MONA09
---------------------------------------------------------------------------
If it finds the member into the first one, OK but if not the process fails.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Tue May 25, 2004 11:51 am Post subject:
Monaco,
The job I posted runs without any problem. The error you are getting is due to the open problem. i.e The dataset is not available for file-aid. Also make sure that you concatenating all like datasets .i.e PDS only. Do not mix panavalet datasets with regular pds.
Why don't you post the JCL you are running and also the dcb parameters of the input PDS's
PROGRAM AND ALL MATERIAL COPYRIGHT 1980,2000 BY COMPUWARE CORPORATION
1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80
DD01 DSN=RSA076.FILEAID.PRUEBA1 OPENED AS PO,
RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=MONA08
DD01O DSN=RSA076.FILEAID.SALIDA OPENED AS PO,
RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=MONA0I
$$DD01 COPY MEMBER=PEPE 00280000
ER048-OPEN ERROR 780-01 WAS ENCOUNTERED ON DD01
.....SKIPPING TO NEXT $$DD CARD RC=4
0 RECORDS WRITTEN TO DD01O-RSA076.FILEAID.SALIDA
VOL=MONA0I
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Tue May 25, 2004 12:47 pm Post subject:
Monaco,
The Job I posted above will run without any problem even if the output is a PDS. My guess is that your output pds RSA076.FILEAID.SALIDA is corrupted.
Try the following
Allocate a new PDS RSA076.New.PDS using 3.2 with the following attributes.
Code:
Data class . . . . . .
Space units . . . . . CYLINDER
Average record unit
Primary quantity . . 1
Secondary quantity 2
Directory blocks . . 5
Record format . . . . FB
Record length . . . . 80
Block size . . . . . 8000
Data set name type : PDS
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum