- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I'm just starting to work with SAS/CONNECT to parallelize some of our programming tasks. I've work out how to pass a lot of things from the parent session to the subtasks (e.g. work library, macro variables, etc), but I can't find a way to pass locally-defined formats (meaning formats that are defined inside the parent code and are not stored anywhere). Is there a way to do this or am I going to need to create a format library to store these local formats so they can be accessed?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@hartwell wrote:
I'm just starting to work with SAS/CONNECT to parallelize some of our programming tasks. I've work out how to pass a lot of things from the parent session to the subtasks (e.g. work library, macro variables, etc), but I can't find a way to pass locally-defined formats (meaning formats that are defined inside the parent code and are not stored anywhere). Is there a way to do this or am I going to need to create a format library to store these local formats so they can be accessed?
Formats have to be stored somewhere to be of any use. Most likely you are asking how to access formats stored in WORK.FORMATS catalog.
You could probably get it to work by doing two things.
1) Use the options in the connection syntax to have the WORK library visible in the remote session.
2) Since that will require that you reference them with a libref other than WORK you will also need to modify the FMTSEARCH option in the remote session so they will be found.
If you want to copy the compiled formats instead of just pointing to them then use PROC UPLOAD with INCAT and OUTCAT options.
proc upload incat=work.formats outcat=work.formats ;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@hartwell wrote:
I'm just starting to work with SAS/CONNECT to parallelize some of our programming tasks. I've work out how to pass a lot of things from the parent session to the subtasks (e.g. work library, macro variables, etc), but I can't find a way to pass locally-defined formats (meaning formats that are defined inside the parent code and are not stored anywhere). Is there a way to do this or am I going to need to create a format library to store these local formats so they can be accessed?
Formats have to be stored somewhere to be of any use. Most likely you are asking how to access formats stored in WORK.FORMATS catalog.
You could probably get it to work by doing two things.
1) Use the options in the connection syntax to have the WORK library visible in the remote session.
2) Since that will require that you reference them with a libref other than WORK you will also need to modify the FMTSEARCH option in the remote session so they will be found.
If you want to copy the compiled formats instead of just pointing to them then use PROC UPLOAD with INCAT and OUTCAT options.
proc upload incat=work.formats outcat=work.formats ;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you are going to be running a lot of parallel SAS tasks, then it would be useful to create a permanent SAS format library and just define it in each of your SAS sessions:
libname MyFmt '<Formal library folder>';
proc format library = MyFmt;
<format statements>
run;
options fmtsearch = (MyFmt WORK SASAUTOS);