BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
sathya66
Barite | Level 11

All,

How can we  find out the list of jobs and timings for batch jobs(ie: how many batch jobs are running on SAS and what time those are scheduled/triggering time).

at the moment, I am checking manually by logging into flow manager for each flow and  at running state as this is not ideal.

Thanks in advance.

SS

1 ACCEPTED SOLUTION

Accepted Solutions
gwootton
SAS Super FREQ

This program will extract flows and their schedules from Metadata into a SAS Dataset.

 

 

/* ---------------------------------------------------[query_job_schedules.sas]-------------------------------- *
 * The purpose of this program is to extract for flows defined in Metadata the schedule associated with them.   *
 * Author: Greg Wootton Date: 06DEC2019 								        *
 *														*
 * Note: Schedules appear differently depending on the scheduling server.					*
 * ------------------------------------------------------------------------------------------------------------ */

/* Specify connection information for the Metadata Server */

options
	metaserver="meta.demo.sas.com"
	metaport=8561
	metauser="sasadm@saspw"
	metapass="password"
	metarepository=Foundation
	metaprotocol=BRIDGE;

/* End edit. */

/* Create a data set to hold the flows and schedules. */
data work.schedule;
	/* define and initialize variables */
	length type $ 22 id flow_id job_id flowjob_id sync_id event_id $ 17 flow_uri flowjob_uri job_uri sync_uri event_uri property_uri $ 60 flow_name flowjob_name job_name sync_name event_name $ 32 schedule $ 255 time $ 50;
	call missing(type,id,flow_id,job_id,sync_id,event_id,flow_uri,job_uri,sync_uri,event_uri,property_uri,flow_name,job_name,event_name,sync_name,schedule,time,flowjob_name,flowjob_id,flowjob_uri);
	keep flow_name job_name time schedule;

    /* This query identifies flows defined in Metadata. */
	flow_obj="omsobj:TransformationActivity?@Id contains '.'";

	/* check for the existence of flows */
	flow_count=metadata_resolve(flow_obj,type,id);

	/* Write number of flows found to SAS log. */
	put "INFO: Number of Flows Found: " flow_count;

	/* if flows exist, walk through gathering the name of the flow, the associated job, and the schedule if one exists. */
	if flow_count > 0 then do n=1 to flow_count;
		rc=metadata_getnobj(flow_obj,n,flow_uri);
		rc=metadata_getattr(flow_uri,"Name",flow_name);
		rc=metadata_getattr(flow_uri,"Id",flow_id);
		rc=metadata_getnasn(flow_uri,"Steps",1,job_uri);
		rc=metadata_getattr(job_uri,"Name",job_name);
		put "INFO: Flow " n "Name: " flow_name;
		job_count=metadata_resolve("omsobj:JFJob?JFJob[JobActivities/TransformationActivity[@Id='"||flow_id||"']]",type,id);
		if job_count > 0 then do m=1 to job_count;
			rc=metadata_getnobj("omsobj:JFJob?JFJob[JobActivities/TransformationActivity[@Id='"||flow_id||"']]",m,flowjob_uri);
			rc=metadata_getattr(flowjob_uri,"Name",flowjob_name);
			rc=metadata_getattr(flowjob_uri,"Id",flowjob_id);
			sync_count=metadata_resolve("omsobj:SyncStep?SyncStep[Transformations/JFJob[@Id='"||flowjob_id||"']]",type,id);
			if sync_count > 0 then do o=1 to sync_count;
			rc=metadata_getnobj("omsobj:SyncStep?SyncStep[Transformations/JFJob[@Id='"||flowjob_id||"']]",o,sync_uri);
			rc=metadata_getattr(sync_uri,"Name",sync_name);
			rc=metadata_getattr(sync_uri,"Id",sync_id);
			event_count=metadata_resolve("omsobj:Event?Event[TriggeredTransforms/SyncStep[@Id='"||sync_id||"']]",type,id);
				if event_count > 0 then do p=1 to event_count;
				rc=metadata_getnobj("omsobj:Event?Event[TriggeredTransforms/SyncStep[@Id='"||sync_id||"']]",p,event_uri);
				rc=metadata_getattr(event_uri,"Name",event_name);
				rc=metadata_getattr(event_uri,"Id",event_id);
				rc=metadata_getattr(event_uri,"Condition",time);
				put "INFO: Condition = " time;
				prop_rc=metadata_getnasn(event_uri,"Properties",2,property_uri);
					if prop_rc > 0 then do;
						rc=metadata_getattr(property_uri,"DefaultValue",schedule);
						 output;
						put "INFO: Schedule = " schedule;	
					end;
					else put "INFO: No properties found for event" event_name;
				end;
			else put "INFO: No events found in syncstep " sync_name;
			end;
			else put "INFO: No syncsteps found in job " job_name;
		end;
		else put "INFO: No jobs found in flow " flow_name;
	end;
	else put "INFO: No flows found.";
run;
	
/* Print the dataset created. */	
proc print data=work.schedule; run;

 

 

--
Greg Wootton | Principal Systems Technical Support Engineer

View solution in original post

10 REPLIES 10
gwootton
SAS Super FREQ

This program will extract flows and their schedules from Metadata into a SAS Dataset.

 

 

/* ---------------------------------------------------[query_job_schedules.sas]-------------------------------- *
 * The purpose of this program is to extract for flows defined in Metadata the schedule associated with them.   *
 * Author: Greg Wootton Date: 06DEC2019 								        *
 *														*
 * Note: Schedules appear differently depending on the scheduling server.					*
 * ------------------------------------------------------------------------------------------------------------ */

/* Specify connection information for the Metadata Server */

options
	metaserver="meta.demo.sas.com"
	metaport=8561
	metauser="sasadm@saspw"
	metapass="password"
	metarepository=Foundation
	metaprotocol=BRIDGE;

/* End edit. */

/* Create a data set to hold the flows and schedules. */
data work.schedule;
	/* define and initialize variables */
	length type $ 22 id flow_id job_id flowjob_id sync_id event_id $ 17 flow_uri flowjob_uri job_uri sync_uri event_uri property_uri $ 60 flow_name flowjob_name job_name sync_name event_name $ 32 schedule $ 255 time $ 50;
	call missing(type,id,flow_id,job_id,sync_id,event_id,flow_uri,job_uri,sync_uri,event_uri,property_uri,flow_name,job_name,event_name,sync_name,schedule,time,flowjob_name,flowjob_id,flowjob_uri);
	keep flow_name job_name time schedule;

    /* This query identifies flows defined in Metadata. */
	flow_obj="omsobj:TransformationActivity?@Id contains '.'";

	/* check for the existence of flows */
	flow_count=metadata_resolve(flow_obj,type,id);

	/* Write number of flows found to SAS log. */
	put "INFO: Number of Flows Found: " flow_count;

	/* if flows exist, walk through gathering the name of the flow, the associated job, and the schedule if one exists. */
	if flow_count > 0 then do n=1 to flow_count;
		rc=metadata_getnobj(flow_obj,n,flow_uri);
		rc=metadata_getattr(flow_uri,"Name",flow_name);
		rc=metadata_getattr(flow_uri,"Id",flow_id);
		rc=metadata_getnasn(flow_uri,"Steps",1,job_uri);
		rc=metadata_getattr(job_uri,"Name",job_name);
		put "INFO: Flow " n "Name: " flow_name;
		job_count=metadata_resolve("omsobj:JFJob?JFJob[JobActivities/TransformationActivity[@Id='"||flow_id||"']]",type,id);
		if job_count > 0 then do m=1 to job_count;
			rc=metadata_getnobj("omsobj:JFJob?JFJob[JobActivities/TransformationActivity[@Id='"||flow_id||"']]",m,flowjob_uri);
			rc=metadata_getattr(flowjob_uri,"Name",flowjob_name);
			rc=metadata_getattr(flowjob_uri,"Id",flowjob_id);
			sync_count=metadata_resolve("omsobj:SyncStep?SyncStep[Transformations/JFJob[@Id='"||flowjob_id||"']]",type,id);
			if sync_count > 0 then do o=1 to sync_count;
			rc=metadata_getnobj("omsobj:SyncStep?SyncStep[Transformations/JFJob[@Id='"||flowjob_id||"']]",o,sync_uri);
			rc=metadata_getattr(sync_uri,"Name",sync_name);
			rc=metadata_getattr(sync_uri,"Id",sync_id);
			event_count=metadata_resolve("omsobj:Event?Event[TriggeredTransforms/SyncStep[@Id='"||sync_id||"']]",type,id);
				if event_count > 0 then do p=1 to event_count;
				rc=metadata_getnobj("omsobj:Event?Event[TriggeredTransforms/SyncStep[@Id='"||sync_id||"']]",p,event_uri);
				rc=metadata_getattr(event_uri,"Name",event_name);
				rc=metadata_getattr(event_uri,"Id",event_id);
				rc=metadata_getattr(event_uri,"Condition",time);
				put "INFO: Condition = " time;
				prop_rc=metadata_getnasn(event_uri,"Properties",2,property_uri);
					if prop_rc > 0 then do;
						rc=metadata_getattr(property_uri,"DefaultValue",schedule);
						 output;
						put "INFO: Schedule = " schedule;	
					end;
					else put "INFO: No properties found for event" event_name;
				end;
			else put "INFO: No events found in syncstep " sync_name;
			end;
			else put "INFO: No syncsteps found in job " job_name;
		end;
		else put "INFO: No jobs found in flow " flow_name;
	end;
	else put "INFO: No flows found.";
run;
	
/* Print the dataset created. */	
proc print data=work.schedule; run;

 

 

--
Greg Wootton | Principal Systems Technical Support Engineer
sathya66
Barite | Level 11
Thanks a lot.
saved my life 🙂
Jlochoa
Obsidian | Level 7
Hi Greg,

Thank you for providing the SAS Code. I ran the code and there are notes in the SAS Log showing Flows (#34-#155) that I don't understand what they are and how they show up in the log. I can account for the 24 Flows in the table. However the "schedule" column is blank. Please advise.

[cid:image001.png@01D61406.943774F0]






1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
61
62 /* ---------------------------------------------------[query_job_schedules.sas]-------------------------------- *
63 * The purpose of this program is to extract for flows defined in Metadata the schedule associated with them. *
64 * Author: Greg Wootton Date: 06DEC2019 *
65 **
66 * Note: Schedules appear differently depending on the scheduling server.*
67 * ------------------------------------------------------------------------------------------------------------ */
68
69 /* Specify connection information for the Metadata Server */
70
71 options
72 metaserver="itsusralsp04835.jnj.com"
73 metaport=8561
74 metauser="sasadm@saspw"
75 metapass=XXXXXXXXXXX
76 metarepository=Foundation
77 metaprotocol=BRIDGE;
78
79 /* End edit. */
80
81 /* Create a data set to hold the flows and schedules. */
82 data work.schedule;
83 /* define and initialize variables */
84 length type $ 22 id flow_id job_id flowjob_id sync_id event_id $ 17 flow_uri flowjob_uri job_uri sync_uri event_uri
84 ! property_uri $ 60 flow_name flowjob_name job_name sync_name event_name $ 32 schedule $ 255 time $ 50;
85 call
85 ! missing(type,id,flow_id,job_id,sync_id,event_id,flow_uri,job_uri,sync_uri,event_uri,property_uri,flow_name,job_name,event
85 ! _name,sync_name,schedule,time,flowjob_name,flowjob_id,flowjob_uri);
86 keep flow_name job_name time schedule;
87
88 /* This query identifies flows defined in Metadata. */
89 flow_obj="omsobj:TransformationActivity?@Id contains '.'";
90
91 /* check for the existence of flows */
92 flow_count=metadata_resolve(flow_obj,type,id);
93
94 /* Write number of flows found to SAS log. */
95 put "INFO: Number of Flows Found: " flow_count;
96
97 /* if flows exist, walk through gathering the name of the flow, the associated job, and the schedule if one exists. */
98 if flow_count > 0 then do n=1 to flow_count;
99 rc=metadata_getnobj(flow_obj,n,flow_uri);
100 rc=metadata_getattr(flow_uri,"Name",flow_name);
101 rc=metadata_getattr(flow_uri,"Id",flow_id);
102 rc=metadata_getnasn(flow_uri,"Steps",1,job_uri);
103 rc=metadata_getattr(job_uri,"Name",job_name);
104 put "INFO: Flow " n "Name: " flow_name;
105 job_count=metadata_resolve("omsobj:JFJob?JFJob[JobActivities/TransformationActivity[@Id='"||flow_id||"']]",type,id);
106 if job_count > 0 then do m=1 to job_count;
107 rc=metadata_getnobj("omsobj:JFJob?JFJob[JobActivities/TransformationActivity[@Id='"||flow_id||"']]",m,flowjob_uri);
108 rc=metadata_getattr(flowjob_uri,"Name",flowjob_name);
109 rc=metadata_getattr(flowjob_uri,"Id",flowjob_id);
110 sync_count=metadata_resolve("omsobj:SyncStep?SyncStep[Transformations/JFJob[@Id='"||flowjob_id||"']]",type,id);
111 if sync_count > 0 then do o=1 to sync_count;
112 rc=metadata_getnobj("omsobj:SyncStep?SyncStep[Transformations/JFJob[@Id='"||flowjob_id||"']]",o,sync_uri);
113 rc=metadata_getattr(sync_uri,"Name",sync_name);
114 rc=metadata_getattr(sync_uri,"Id",sync_id);
115 event_count=metadata_resolve("omsobj:Event?Event[TriggeredTransforms/SyncStep[@Id='"||sync_id||"']]",type,id);
116 if event_count > 0 then do p=1 to event_count;
117 rc=metadata_getnobj("omsobj:Event?Event[TriggeredTransforms/SyncStep[@Id='"||sync_id||"']]",p,event_uri);
118 rc=metadata_getattr(event_uri,"Name",event_name);
119 rc=metadata_getattr(event_uri,"Id",event_id);
120 rc=metadata_getattr(event_uri,"Condition",time);
121 put "INFO: Condition = " time;
122 prop_rc=metadata_getnasn(event_uri,"Properties",2,property_uri);
123 if prop_rc > 0 then do;
124 rc=metadata_getattr(property_uri,"DefaultValue",schedule);
125 output;
126 put "INFO: Schedule = " schedule;
127 end;
128 else put "INFO: No properties found for event" event_name;
129 end;
130 else put "INFO: No events found in syncstep " sync_name;
131 end;
132 else put "INFO: No syncsteps found in job " job_name;
133 end;
134 else put "INFO: No jobs found in flow " flow_name;
135 end;
136 else put "INFO: No flows found.";
137 run;

INFO: Number of Flows Found: 155
INFO: Flow 1 Name: QAR40_VIBES_Raised_Events_Trigge
INFO: Condition = WE_dm1_sk1_st20200416_@:1:27:1
INFO: Schedule =

INFO: Flow 2 Name: QAR40_VIBES_Raised_Events_Trigge
INFO: Condition = DA_sk1_st20200416_@:13:27:1
INFO: Schedule =
INFO: Flow 3 Name: QAR40_VIBES_Raised_Events_Trigge
INFO: Condition = DA_sk1_st20200416_@:1:32:1
INFO: Schedule =
INFO: Flow 4 Name: QAR43_NC_Lot_Selection_Phase_Tri
INFO: Condition = DA_sk1_st20200416_@:1,13:30:1
INFO: Schedule =
INFO: Flow 5 Name: QAR43_NC_Correction_Phase_Trigge
INFO: Condition = DA_sk1_st20200416_@:1:44:1
INFO: Schedule =
INFO: Flow 6 Name: QAR45_Trigger_JAX
INFO: Condition = DA_sk1_st20200323_@:6:01:1
INFO: Schedule =
INFO: Flow 7 Name: QAR45_Trigger_IRE
INFO: Condition = DA_sk1_st20200323_@:1:58:1
INFO: Schedule =
INFO: Flow 8 Name: Daily_NC_Trigger
INFO: Condition = DA_sk1_st20200324_@:5:55:1
INFO: Schedule =
INFO: Flow 9 Name: QAR53_Shipping_Data_ETL_Trigger
INFO: No syncsteps found in job QAR53_Shipping_Data_ETL_Trigger
INFO: Flow 10 Name: corona_keyword_search
INFO: Condition = WE_dm64_sk1_st20200312_@:17:00:1
INFO: Schedule =

INFO: Flow 11 Name: QAR_Selection_Variables
INFO: Condition = DA_sk1_st20200311_@:5:00:1
INFO: No properties found for eventTimeEvent
INFO: Flow 12 Name: jjsv_capa_data_pull
INFO: Condition = DA_sk1_st20200224_et20200320_@:4:00:1
INFO: Schedule =
<
/schedule>
INFO: Flow 13 Name: OSP_Complaint_Data_Extract
INFO: Condition = WE_dm1_sk1_st20200131_@:6:00:1
INFO: No properties found for eventTimeEvent
INFO: Flow 14 Name: QAR_Task_Cleanup
INFO: Condition = DA_sk1_st20200110_@:1:00:1
INFO: Schedule =
INFO: Flow 15 Name: jjsv_catsweb_extract
INFO: Condition = DA_sk1_st20200109_@:3:00:1
INFO: Schedule =
INFO: Flow 16 Name: QAR45_IRE
INFO: No events found in syncstep Flow Triggering Event
INFO: Flow 17 Name: QAR45_JAX
INFO: No events found in syncstep Flow Triggering Event
INFO: Flow 18 Name: days_of_supply_mbox
INFO: Condition = DA_sk1_st20190927_@:7:15:1
INFO: Schedule =
INFO: Flow 19 Name: driver_mdr_report
INFO: Condition = WE_dm1_sk1_st20190916_@:7:00:1
INFO: Schedule =

INFO: Flow 20 Name: QAR40_Ireland_Quality_All_Open_N
INFO: Condition = DA_sk1_st20190821_@:1,13:50:1
INFO: Schedule =
INFO: Flow 21 Name: QAR43_FAI_Phase_Check_Trigger
INFO: Condition = DA_sk1_st20190821_@:6:00:1
INFO: Schedule =
INFO: Flow 22 Name: QAR40_Open_NC_Supplier_Related_I
INFO: No syncsteps found in job QAR40_Open_NC_Supplier_Related_I
INFO: Flow 23 Name: QAR40_NC_Event_Pushed_to_Finish_
INFO: Condition = WE_dm1_sk1_st20190821_@:3:00:1
INFO: Schedule =

INFO: Flow 24 Name: QAR40_IE_VIBES_Pending_Correctio
INFO: Condition = WE_dm64_sk1_st20190821_@:23:30:1
INFO: Schedule =

INFO: Flow 25 Name: QAR40_IE_All_Open_NC_Indicator_T
INFO: Condition = DA_sk1_st20200303_@:1:55:1
INFO: Schedule =
INFO: Flow 26 Name: One_Voice
INFO: Condition = DA_sk1_st20190624_@:2:00:1
INFO: Schedule =
INFO: Condition = DA_sk1_st20190624_@:2:00:1
INFO: No properties found for eventTimeEvent
INFO: Flow 27 Name: Shipping
INFO: Condition = DA_sk1_st20190624_@:3:05:1
INFO: Schedule =
INFO: Flow 28 Name: daily_listing_slug_microlens
INFO: Condition = DA_sk1_st20180727_@:7:00:1
INFO: Schedule =
INFO: Flow 29 Name: ireland_fm_weekly
INFO: Condition = WE_dm1_sk1_st20180508_@:6:00:1
INFO: No properties found for eventTimeEvent
INFO: Flow 30 Name: derive_regrpt
INFO: No events found in syncstep Flow Triggering Event
INFO: Flow 31 Name: tableau_data_subset_mod
INFO: Condition = WE_dm64_sk1_st20200225_@:1:00:1
INFO: Schedule =

INFO: Flow 32 Name: Customer_Relations_auto_monthly_
INFO: Condition = MO_dw2ww2_sk1_st20200416_@:7:30:1
INFO: Schedule =
>
INFO: Condition = MO_dw2ww2_sk1_st20200416_@:7:30:1
INFO: No properties found for eventTimeEvent
INFO: Flow 33 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 34 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 35 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 36 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 37 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 38 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 39 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 40 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 41 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 42 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 43 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 44 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 45 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 46 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 47 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 48 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 49 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 50 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 51 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 52 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 53 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 54 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 55 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 56 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 57 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 58 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 59 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 60 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 61 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 62 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 63 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 64 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 65 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 66 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 67 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 68 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 69 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 70 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 71 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 72 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 73 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 74 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 75 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 76 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 77 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 78 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 79 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 80 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 81 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 82 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 83 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 84 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 85 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 86 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 87 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 88 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 89 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 90 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 91 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 92 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 93 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 94 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 95 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 96 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 97 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 98 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 99 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 100 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 101 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 102 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 103 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 104 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 105 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 106 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 107 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 108 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 109 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 110 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 111 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 112 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 113 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 114 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 115 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 116 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 117 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 118 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 119 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 120 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 121 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 122 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 123 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 124 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 125 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 126 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 127 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 128 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 129 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 130 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 131 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 132 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 133 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 134 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 135 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 136 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 137 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 138 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 139 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 140 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 141 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 142 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 143 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 144 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 145 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 146 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 147 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 148 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 149 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 150 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 151 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 152 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 153 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 154 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
INFO: Flow 155 Name: New Transformation Activity
INFO: No jobs found in flow New Transformation Activity
NOTE: The data set WORK.SCHEDULE has 24 observations and 4 variables.
NOTE: Compressing data set WORK.SCHEDULE increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
real time 1.44 seconds
user cpu time 0.43 seconds
system cpu time 0.14 seconds
memory 6720.28k
OS Memory 37532.00k
Timestamp 04/16/2020 01:23:24 PM
Step Count 63 Switch Count 2032
Page Faults 0
Page Reclaims 1730
Page Swaps 0
Voluntary Context Switches 14328
Involuntary Context Switches 6706
Block Input Operations 0
Block Output Operations 264


138
139 /* Print the dataset created. */
140 proc print data=work.schedule; run;

NOTE: There were 24 observations read from the data set WORK.SCHEDULE.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.08 seconds
user cpu time 0.08 seconds
system cpu time 0.00 seconds
memory 1996.62k
OS Memory 31900.00k
Timestamp 04/16/2020 01:23:24 PM
Step Count 64 Switch Count 0
Page Faults 0
Page Reclaims 23
Page Swaps 0
Voluntary Context Switches 1
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 24


141
142
143 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
156


Best Regards,
Jose-Luis Ochoa
Principal Engineer QA Systems
Johnson & Johnson Vision

Johnson & Johnson Vision Care, Inc.
7500 Centurion Pkwy., Jacksonville, FL 32256
T: +1 904 443 1092
jochoa6@its.jnj.com

gwootton
SAS Super FREQ
This is because of the scheduling server being used, your entire schedule is under time (condition in the log), listing the calendar being used and time.

INFO: Flow 1 Name: QAR40_VIBES_Raised_Events_Trigge
INFO: Condition = WE_dm1_sk1_st20200416_@:1:27:1
INFO: Schedule =
--
Greg Wootton | Principal Systems Technical Support Engineer
Jlochoa
Obsidian | Level 7
SAS Log showing Flows (#34-#155) that I don't understand. What they are and how they show up in the log.
gwootton
SAS Super FREQ
This is because the of the way the program is written. It defines flows as any TransformationActivity metadata object type and it will write out every one it finds to the log, but not all TransformationActivity objects are flows. The code could be updated to not do that.
--
Greg Wootton | Principal Systems Technical Support Engineer
Bruno7
Obsidian | Level 7

How can I get a listing of all field names that are available for extract from metadata?

 

It seems like from the code examples I am seeing that the metadata is organized into broad categories: job_uri_event_uri, file_uri, dir_uri, etc.

How can I know the names of the fields available for extract under each uri?

 

I am currently needing to extract job condition so that I can view job dependency set up within a flow.

 

Examples of these "_uri"s in the code.....

rc=metadata_getnasn(file_uri,"Directories",1,dir_uri);
rc=metadata_getattr(dir_uri,"DirectoryName",dir_name);
rc=metadata_getnasn(job_uri,"TargetSpecifications",1,dsbs_uri);
rc=metadata_getattr(dsbs_uri,"Id",dsbs_id);

 

I am not seeing anything tangible I can use in the SAS online metadata documentation:

What's New: What's New in SAS 9.4 Metadata Model: Reference :: SAS(R) 9.4 Metadata Model: Reference

gwootton
SAS Super FREQ
The metadata model documentation indicates each object type and it's fields. You may want to use the metabrowse function of base SAS to visualize these associations for something as complex as a flow. This will also show you all the attributes for each object.

Obtaining Metadata Names and Identifiers
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/p1sx3unuqtoykbn141wrhpcj3n1t.htm

The flow object is of type JFJob with a PublicType attribute of "DeployedFlow".
It has an association "JobActivities" that points to a TransformationActivity object type with the same name as the flow.
The TransformationActivity object has a "Steps" association that includes TransformationStep objects for each deployed job in the flow, and possibly SyncStep objects for things like grouping gate nodes.

The TransformationStep objects are associated with the individual job objects (JFJob objects of PublicType "DeployedJob") as well potentially as having PredecessorDependencies and SuccessorDependencies associations to StepPrecendence objects to describe the precedence between the jobs and the qualifier (e.g. job completes successfully). Those StepPrecedence objects will have Predecessors and Successors associations to tie them to the next TransformationStep or SyncStep in the flow.

So, the TransformationStep objects without a PredecessorDependencies association are the ones that go first, and those without a SuccessorDependencies association go last, and those with both are in between, and the StepPrecendence objects are what link them together.
--
Greg Wootton | Principal Systems Technical Support Engineer
Bruno7
Obsidian | Level 7

All I want extracted is the event type and event description (see photo).  I am guessing this is a part of "event_uri, but how do I find the variable names for event type and event description?  (or is it as simple as event_type and event_desc, for instance?

 

rc=metadata_getattr(event_uri,"Id",event_id);

 

Also, now do I use the metabrowse function? Is there sample code somewhere? I have no idea the syntax.  "You may want to use the metabrowse function of base SAS to visualize these associations for something as complex as a flow".

 

Bruno7_0-1654287510244.png

 

gwootton
SAS Super FREQ
In my code, the "event" is referring to the triggering event for the flow, not the transition between each job inside a flow. Each of those connections in your flow is a StepPrecedence object I mentioned. In your screen shot you are looking at one of many.

The link I provided mentions the metabrowse function. You type "metabrowse" into the command window in the top left of the windowed base SAS session and hit enter to start it, and it will prompt you for connection information to Metadata.
--
Greg Wootton | Principal Systems Technical Support Engineer

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

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.

Discussion stats
  • 10 replies
  • 6321 views
  • 1 like
  • 4 in conversation