June 13, 2012, 11:33 AM
moyer1dl [SOLVED]Concatenating Mainframe Data Sets
I am trying read multiple fileS under the same master using the USE command. The problem is I am getting no error but it still only seems to read only one of the files. Here is the code.
SQL EDA SET SERVER SSSSERVE
-REMOTE BEGIN
DYNAM ALLOC DD DATAFIL1 DS CCC.CC.CCDX230.CSS60501.G4745V00 SHR
DYNAM ALLOC DD DATAFIL2 DS CCC.CC.CCDX230.CSS60501.G4744V00 SHR
DYNAM ALLOC DD DATAFIL3 DS CCC.CC.CCDX230.CSS60501.G4743V00 SHR
DYNAM ALLOC DD DATAFIL4 DS CCC.CC.CCDX230.CSS60501.G4742V00 SHR
DYNAM ALLOC DD DATAFIL5 DS CCC.CC.CCDX230.CSS60501.G4741V00 SHR
USE
DATAFIL1 AS DCMDSEFH
DATAFIL2 AS DCMDSEFH
DATAFIL3 AS DCMDSEFH
DATAFIL4 AS DCMDSEFH
DATAFIL5 AS DCMDSEFH
END
TABLE FILE DCMDSEFH
SUM
CNT.NAME AS 'COUNT,NAME'
BY NAME
ON TABLE SET ONLINE-FMT HTML
END
-REMOTE END
Any Help?
This message has been edited. Last edited by: moyer1dl , June 18, 2012 10:36 AM June 13, 2012, 11:37 AM
Tom Flynn Try a -RUN after the USE END statement.
If that doesn't work, replace the USE with:
DYNAM CONCAT DDNAME DCMDSEFH DATAFIL1 DATAFIL2 DATAFIL3 DATAFIL4 DATAFIL5
-RUN
June 13, 2012, 11:42 AM
Danny-SRL Are these files FOCUS files?
If they are not then the USE command won't do anything.
June 13, 2012, 05:45 PM
Waz The key think is the type of file.
As specified above, use...
DYNAM CONCAT for non FOCUS files, they must be the same structure.
USE for FOCUS files, they must have be created with the same MASTER file.
June 18, 2012, 10:37 AM
moyer1dl Thanks All DYNAM CONCAT worked.