The power of PROC DMSRVADM lies in its ability to turn transient server status into historical data. By default, the procedure gives you a snapshot of current or recent jobs. To build a true performance dashboard, use PROC APPEND after your DMSRVADM step to accumulate these snapshots into a permanent history table. This allows you to visualize execution time trends over weeks or months and identify degrading performance before it causes a failure.
Attention : This code requires administrator privileges.
Examples use generic hosts and ports for connecting to the DataFlux Data Management server. The output data set 'work.jobReport' is dynamically created by the DMSRVADM procedure itself. No external data set is required.
1 Code Block
PROC DMSRVADM
Explanation : This code is the simplest use of the DMSRVADM procedure. It connects to a DataFlux Data Management server specified by the HOST and PORT options, then generates a SAS data set named `work.jobReport` containing the task status. A PROC PRINT is added to quickly view the first lines of the report.
Copied!
/* Cet exemple génère un rapport d'état de tâche basique
à partir d'un serveur DataFlux Data Management spécifié. */
proc dmsrvadm
out=work.jobReport
host='http://myviyahost.example.com' port=50001;
run;
/* Affiche les 5 premières observations du rapport généré */
proc print data=work.jobReport(obs=5);
title 'Rapport d''état de tâche basique';
run;
1
/* Cet exemple génère un rapport d'état de tâche basique
2
à partir d'un serveur DataFlux Data Management spécifié. */
3
PROC DMSRVADM
4
out=work.jobReport
5
host='http://myviyahost.example.com' port=50001;
6
RUN;
7
8
/* Affiche les 5 premières observations du rapport généré */
9
PROC PRINTDATA=work.jobReport(obs=5);
10
title 'Rapport d''état de tâche basique';
11
RUN;
2 Code Block
PROC DMSRVADM
Explanation : This example illustrates an intermediate use by filtering the `work.fullJobReport` data set generated by `DMSRVADM` to include only tasks with 'COMPLETED' status. Although direct filtering options for DMSRVADM are not specified in the excerpt, post-processing the output data set is a common approach. Column names like '_Status_' are assumptions based on typical task status reports. A PROC PRINT displays the filtered result.
Copied!
/* Cet exemple génère un rapport d'état de tâche,
puis filtre les tâches avec un statut 'COMPLETED'.
NOTE: Les options comme STATUS= ou JOBNAME= sont hypothétiques car non spécifiées
dans l'extrait de documentation fourni pour DMSRVADM directement, mais la post-traitement
est une approche standard pour des procédures d'administration de ce type. */
proc dmsrvadm
out=work.fullJobReport
host='http://myviyahost.example.com' port=50001;
run;
/* Filtre et affiche uniquement les tâches terminées */
data work.completedJobs;
set work.fullJobReport;
where _Status_ = 'COMPLETED'; /* '_Status_' est un nom de colonne supposé */
run;
proc print data=work.completedJobs;
title 'Rapport des tâches terminées';
run;
1
/* Cet exemple génère un rapport d'état de tâche,
2
puis filtre les tâches avec un statut 'COMPLETED'.
3
NOTE: Les options comme STATUS= ou JOBNAME= sont hypothétiques car non spécifiées
4
dans l'extrait de documentation fourni pour DMSRVADM directement, mais la post-traitement
5
est une approche standard pour des procédures d'administration de ce type. */
6
PROC DMSRVADM
7
out=work.fullJobReport
8
host='http://myviyahost.example.com' port=50001;
9
RUN;
10
11
/* Filtre et affiche uniquement les tâches terminées */
12
DATA work.completedJobs;
13
SET work.fullJobReport;
14
where _Status_ = 'COMPLETED'; /* '_Status_' est un nom de colonne supposé */
15
RUN;
16
17
PROC PRINTDATA=work.completedJobs;
18
title 'Rapport des tâches terminées';
19
RUN;
3 Code Block
PROC DMSRVADM
Explanation : This advanced example leverages SAS macro variables to make the `HOST`, `PORT`, and output data set name parameters dynamic. After report generation, additional analysis procedures (PROC FREQ and PROC SQL) are used to understand the distribution of task statuses and create an aggregated summary. This shows how DMSRVADM output can be integrated into a more complex analysis workflow.
Copied!
/* Cet exemple utilise des macro-variables pour paramétrer
l'hôte et le port du serveur DataFlux Data Management,
offrant une plus grande flexibilité. Le rapport est ensuite analysé plus en détail. */
%let server_host = http://myviyahost.example.com;
%let server_port = 50001;
%let output_dataset = work.dynamicJobReport;
proc dmsrvadm
out=&output_dataset
host=&server_host port=&server_port;
run;
/* Analyse la distribution des statuts de tâche */
proc freq data=&output_dataset;
tables _Status_;
title "Distribution des statuts de tâche pour le serveur &server_host";
run;
/* Création d'un rapport agrégé par statut de tâche */
proc sql;
create table work.statusSummary as
select _Status_, count(*) as NumberOfJobs
from &output_dataset
group by _Status_;
quit;
proc print data=work.statusSummary;
title 'Résumé des tâches par statut';
run;
1
/* Cet exemple utilise des macro-variables pour paramétrer
2
l'hôte et le port du serveur DataFlux Data Management,
3
offrant une plus grande flexibilité. Le rapport est ensuite analysé plus en détail. */
4
%let server_host = http://myviyahost.example.com;
5
%let server_port = 50001;
6
%let output_dataset = work.dynamicJobReport;
7
8
PROC DMSRVADM
9
out=&output_dataset
10
host=&server_host port=&server_port;
11
RUN;
12
13
/* Analyse la distribution des statuts de tâche */
14
PROC FREQDATA=&output_dataset;
15
tables _Status_;
16
title "Distribution des statuts de tâche pour le serveur &server_host";
17
RUN;
18
19
/* Création d'un rapport agrégé par statut de tâche */
20
PROC SQL;
21
create TABLE work.statusSummary as
22
select _Status_, count(*) as NumberOfJobs
23
from &output_dataset
24
group BY _Status_;
25
QUIT;
26
27
PROC PRINTDATA=work.statusSummary;
28
title 'Résumé des tâches par statut';
29
RUN;
4 Code Block
PROC DMSRVADM / PROC CASUTIL
Explanation : This example demonstrates how to integrate `DMSRVADM` output into the SAS Viya Cloud Analytic Services (CAS) environment. The initial `work.jobReportLocal` report is first generated locally, then the `PROC CASUTIL` procedure is used to load this data set into the CASUSER library (or another specified CAS library) under the name `jobReportCAS`. This allows leveraging CAS's distributed and in-memory processing capabilities for large or complex task status report data analysis. `cas` commands are included to manage the CAS session. A `PROC CAS PRINT` is then used to view the CAS table.
Copied!
/* Cet exemple génère un rapport d'état de tâche,
puis le charge dans une table CAS pour une analyse en mémoire distribuée. */
proc dmsrvadm
out=work.jobReportLocal
host='http://myviyahost.example.com' port=50001;
run;
/* Démarre une session CAS si elle n'est pas déjà active */
/* Remplacez 'cas.example.com' et 'casuser' par vos informations de session CAS */
options cashost="cas.example.com" casport=5570;
cas casauto;
/* Charge le jeu de données local dans une table CAS */
proc casutil;
load casdata="jobReportLocal" incaslib="WORK" outcaslib="CASUSER" replace;
run;
/* Affiche les premières lignes de la table CAS */
proc cas print data=CASUSER.jobReportCAS(obs=5);
title 'Rapport d''état de tâche chargé dans CAS';
run;
/* Termine la session CAS (facultatif) */
cas casauto terminate;
/* Le flag CAS est à 1 pour cet exemple */
1
/* Cet exemple génère un rapport d'état de tâche,
2
puis le charge dans une table CAS pour une analyse en mémoire distribuée. */
3
PROC DMSRVADM
4
out=work.jobReportLocal
5
host='http://myviyahost.example.com' port=50001;
6
RUN;
7
8
/* Démarre une session CAS si elle n'est pas déjà active */
9
/* Remplacez 'cas.example.com' et 'casuser' par vos informations de session CAS */
10
options cashost="cas.example.com" casport=5570;
11
cas casauto;
12
13
/* Charge le jeu de données local dans une table CAS */
/* Affiche les premières lignes de la table CAS */
19
PROC CASPRINTDATA=CASUSER.jobReportCAS(obs=5);
20
title 'Rapport d''état de tâche chargé dans CAS';
21
RUN;
22
23
/* Termine la session CAS (facultatif) */
24
cas casauto terminate;
25
26
/* Le flag CAS est à 1 pour cet exemple */
Pro Tip
The PROC DMSRVADM procedure is an essential tool for administrators to bridge the gap between DataFlux Data Management Server operations and SAS Viya analytics. By converting server metadata into a standard SAS data set, it enables automated monitoring and proactive troubleshooting.
To leverage this procedure effectively, follow these administrative best practices:
Automate Health Checks: Use PROC DMSRVADM within a scheduled job (via SAS Job Execution or CRON) to pull status reports at regular intervals. Combined with a PROC FREQ or PROC SQL step, you can automatically detect surges in "FAILED" or "ERROR" statuses and trigger alert emails.
Centralize with CAS: For organizations running multiple DataFlux servers, aggregate the local data sets from each server and load them into a global CAS table. This allows for a unified, real-time dashboard of your entire data management landscape using SAS Visual Analytics.
Handle Metadata Naming: Be aware that metadata column names (like _Status_ or _Host_) can vary depending on your DataFlux version. Always run a PROC CONTENTS or table.columnInfo on your first output to verify the exact variable names before building downstream filters or SQL logic.
Secure Connection Parameters: Avoid hardcoding server credentials. Use macro variables or the SAS Metadata Server to manage host and port values, ensuring that administrative scripts remain portable and easier to maintain across different environments (Dev, Test, Prod).
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.