Hi @Renganathan,
When running in batch, you need to specify a series of META* options that tell the SAS session how to find the metadata server. METASERVER, METAPORT, METAUSER, and METAPASS are for the connection info and credentials. These can be specified on the SAS command, in a config file, or in a separate METAPROFILE file. See more details here.
Moving this to the admin board -- folks there might have further ideas for you.
One option to have your SMC-defined SAS LIBNAMES to be available automatically in all environments, is to assign them all using the native engine option instead of the metadata one.
If you then also pre-assign them, then it doesn't matter what SAS environment you run your programs in: EG, SAS/Studio, batch and so on then the LIBNAMES will be defined at start-up without any extra configuring. We use this approach ourselves and it works like a charm.
We work in a similar fashion. We develop code in EG and then schedule this to run in batch mode on our SAS server using LSF. We are reliant on our SMC-defined libraries to be available identically in EG and batch. This works with pre-assigned native-engine libraries and there is no setup difference between EG and batch - our code is identical.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.