Page 1 of 1

Read Mainframe Base File

Posted: Thu Jun 05, 2008 8:48 am
by Meera
Hi All,
I have a requirement to read multiple GDG's (versions) of a mainframe file. The current design I am using is to FTP different GDG's , combine them using a funnel and then write to a dataset.

The question is , is there any way I could read the base mainframe file through an FTP stage, instad of using multiple FTP stages to read different GDG's and then combine them.

I tried specifying the base filename in FTP, and it failed with an error: filename not found. Any suggestions on whether we could directly read the base mainframe file instead of GDG's?

Thanks

Posted: Thu Jun 05, 2008 1:20 pm
by randallwarren
//SORT1 EXEC SORTD,CYL=600,TIME.SORT=120
//SORTIN DD DSN=PRD.PMKSxxx.SQ.BASEGDG,DISP=SHR
//SORTOUT DD DSN=PRD.PMKSxxx.SQ.FILETOFTP,DISP=(,CATLG,DELETE
// UNIT=TAPE9,DCB=(INDX,LRECL=24,RECFM=FB)
//SYSIN DD *
SORT FIELDS=COPY
END
/*
On Mainframe you can copy GDG's to one file (as above) quickly and FTP the single file.

Posted: Thu Jun 05, 2008 1:39 pm
by Meera
Thanks Randall. Combining them in mainframe would be a good option.

Right now I am using FTP plug in stage. So I can read only one file at a time(could we read more?)
If I use FTP Enterprise Stage, would I be able to read multiple files at the same time by providing multiple URI's?

Posted: Thu Jun 05, 2008 2:41 pm
by ray.wurlod
The JCL Randall provided (suitably adapted to your site) will produce one file that you can transfer using FTP.

Posted: Fri Jun 06, 2008 9:35 am
by Meera
Thanks Ray