DATA Step, Macro, Functions and more

How to specify multiple files to the -config

Reply
Occasional Contributor
Posts: 6

How to specify multiple files to the -config

I am trying to make use of the -confi g option to enable use of the UTF8 sas on linux.

 

I cannot change the sas link which points to bin/sas.

 

sas -config "file.cfg file2.cfg"

sas -config (file.cfg file2.cfg)

sas -config 'file1.cfg, file2.cfg'

 

All fail.  Any suggestions?

 

 

Trusted Advisor
Posts: 1,377

Re: How to specify multiple files to the -config

[ Edited ]

Why do you need two config files?

Prepare each config filke with all requiered options, adapted to your needs,

and submit with the one you want, either file1.cfg or file2.cfg

Trusted Advisor
Posts: 1,615

Re: How to specify multiple files to the -config

I could see, for example, a global CONFIG file and then you want to update the config based on specific requirements for a given project, thus two CONFIG files; although you could also combine these into a single CONFIG file for this specific project, which seems like it eliminates the problem of multiple CONFIG files.

 

Nevertheless, the SAS documentation for z/OS states

 

Note: SAS system options that you specify in the user configuration file override system options that are specified in the system configuration file.
Normally, CONFIG is specified as a PROC option or REXX or CLIST option, and not as a SAS command line system option. However, it can be specified as a SAS command line option. Unlike most such options, if there are multiple instances of CONFIG= on the command line, all instances are processed instead of just the last one. You can take advantage of this to mix types of configuration files that cannot be concatenated. For example, to append a private UNIX configuration file named ~/sas.cfg in batch JCL, use one of the following statements:
//         OPTIONS='CONFIG=CONFIG CONFIG="~/sas.cfg"'
or
//         OPTIONS='CONFIG=(CONFIG "~/sas.cfg")'
Explicitly specifying the default of CONFIG=CONFIG allows the second CONFIG= value to be appended to the default instead of superseding it.
 
 

As I have never tried this, I can't comment further on this matter. I also don't know if this works for other operating systems.

Super User
Posts: 9,681

Re: How to specify multiple files to the -config

Ask a Question
Discussion stats
  • 3 replies
  • 122 views
  • 0 likes
  • 4 in conversation