09-26-2013 01:28 PM
Are you referring to using the same SAS dataset or accessing an external file such as a text file for input/output?
You probably need the SAS Share module if wanting to access SAS datasets.
Your environment may also make a difference. Are both programs running on the same physical computer? Accessing the file through a remote connection/ server? Operating systems?
09-27-2013 04:19 AM
I am refering to a file ( a mainframe file) and not SAS dataset. This file is only for reading and no write operation will or can happen to the file.
I acccess the file using below statements....
infile "&dataset_name" Ftp Host='xxxxx' Port=xx USER='XXXX' PASS='xxxxxxxxxxxxxxx' firstobs = 1 binary lrecl=3000 blocksize=32385 debug end=eof;
input @0003 XXXXXXXXXXXXXXXX_ID S370FZD4.0 @;
Now suppose 2 different sas programs (one in mainframe and the other in unix) use this file for reading data... and if they happen to access the file and start reading at the same time , then will it create any problem. If yes, then is there any option to avoid that problem....?
The above is how UNIx SAS program will access the Mainframe file...
and below is how mainframe SAS program will access the same file :
infile FILN lrecl = 3000 firstobs = 1 truncover;
attrib COL1 length = $19 informat = $ebcdic19.;
attrib C02 length = $26 informat = $ebcdic26.;
input @ 4 COL1 $ebcdic19.
@ 23 COL2 $ebcdic26.
09-27-2013 07:59 AM
I'm no mainframe specialist, but in most operating environments, there are no limits on how many read locks there may exist simultaneously. If you want to be 100% sure, discuss this with a Z/OS expert at your site.
09-26-2013 02:35 PM
Should not be an issue to READ the same file. If it is a SAS dataset you might want to add the ACCESS=READONLY option to the libname statement to prevent anyone from trying to modify the file while others are reading it.