Sorry for the English language skills!
SAS version 9.3
It is necessary to automate the process of obtaining the source code of Job
. I know the way through deploy/redeploy, but it is not suitable for the creation of deploy metadata.
Through macro:
data job_source_code;
length uri source_uri $256.;
length text $1000.;
_rc = metadata_getnobj("omsobj:Job?@Name='JOB_NAME'", 1, uri);
_rc = METADATA_GETNASN(uri, 'SourceCode', 1, source_uri);
_rc = METADATA_GETATTR(source_uri, 'StoredText', text);
run;
But the field text
is always empty.
What am I doing wrong? Is there any other way to automate the process of obtaining the source code of Job
?