I have a code written on mainframe .Now i need to bring that code into pc sas .
The problem is to execute the code i have some flatfiles which are on the mainframes also into pc sas as they are removing the flat files after few days and all of these flatfiles are not of same data type and not of same format(one file is comma and another is tab)
If your mainframe data files will be removed prior to your SAS PC code execution, you will need to copy these files, likely with FTP (either a PUT from mainframe, when data is made available, or a GET from PC), to an accessible drive/directory location.
For one SAS code perspective, you will need to change any JCL DD allocations to either SAS LIBNAME (SAS data libraries) or SAS FILENAME (external non-SAS data files).
For your existing SAS data libraries maintained on the mainframe, you will need to copy/transfer these files in a SAS XPORT format.
Any SAS formats/INFORMATs unique to your application must also be copied/transfered to a suitable SAS catalog, also using SAS XPORT format libraries, or by rebuilding the items with your source code.
Obviously, if there are any outputs generated by your application (text-format, web-content), output to external file locations, these processes must be reviewed and updated accordingly. You will want to gain a detailed knowledge of each aspect of your mainframed-based SAS application, and apply your own review process, to develop an migration / conversion (and possibly even a parallel-testing) plan.
Also, you can find additional technical resources (papers from SAS SUGI/SGF user community/conference) at the SAS support website http://support.sas.com/ using the SEARCH facility on the main web page. As well, there is SAS product documentation on referenced topics such as SAS XPORT (transport format) files.
I agree with everything sbb said.
Just 2 other approaches:
1. In case SAS/Integration Technology is installed in your site: You could run the job from your PC SAS accessing the files via rsubmit - and then save the resulting SAS tables in a PC SAS environment.
2. You could run your existing code on the mainfraime. Write an additional job which pack the resulting SAS file (proc cport), and send it per ftp put to a windows directory - unpack the SAS file with PC SAS using proc cimport.