08-30-2016 04:02 AM
We need to migrate the mainframe files (input to SAS programs) to Linux environment whihc are to be read by SAS programs. The mainframe files are VSAM files and GDGs' which house historic data. How do we accomplish this without any major difficulties.
As the Mainframe files are in EBCDIC format, i think a format conversion shoudl happen from ENCDIC to ASCII. Thoughts pls..
08-30-2016 04:33 AM
You need to check the format of the data in the EBCDIC files. If it contains any funny numeric COBOL formats like signed decimal etc then translating them to ASCII will trash them.
One option is to bring the files across using a binary transfer (no translation) and then use SAS's EBCDIC informats (they start with the letters S370) on Linux to translate them. See this link:
I've done this myself without any major problems. This is probably the safest approach and is something you can test out before you bring the majority of the files across.
08-30-2016 05:09 AM
Thanks for the response.
I forgot to mention one point in my question, which is, the application programs currently running on mainframes are written in SAS itself (no COBOL intervention).. The objective is to migrate the entire sytem(data residing in files and application programs) from Mainframes to Linux. So my questions now are
1) What conversion should I do in data (migrated from Mainframes) before being used by SAS program in Linux environment.
2) How to handle the VSAM files?
3) How to handle the Generation Data Groups (GDGs' with multiple versions).
08-30-2016 05:24 AM
1) SAS data sets can be migrated using PROC CPORT/CIMPORT/MIGRATE. Be aware of that differncies between EBCDIC/ANSI can be an issue in this scenario as well.
2) Depends on how your new environment is designed. Will you still use VSAM files coninously, or can you haev the replaced by your data providers in a different format (preferred)?
3) For SAS data sets there is a functionality for generations, which I think is similar to what you have.
08-30-2016 07:41 AM
One thing that needs to be handled with caution are files that contain data in packed decimal format. These must not be converted, as the conversion process would scramble the PD format. Instead transfer in binary mode and use $EBCDIC and S370.... formats.
08-30-2016 04:03 PM
So what formats are used in mainframe SAS to write numbers to the VSAM files? Remember SAS can write COBOL-style formats as well as read them. If you are just writing numbers using nnn.dd type SAS formats then you should be OK translating to ASCII. However if you use SAS formats like PDnnn.dd then you wont be able to translate these to ASCII.
There is no equivalent of VSAM files on Linux or exact equivalent of GDGs either so you will need to rewrite that part of your SAS application.