I've created an Easytrieve that converts MVS Calendars to the proper XML format. I then created a job that FTPs the MVS file and saves it in a designated folder in XML format. From there I have created another job that uses the defcal utility to add the calendar to Enterprise. Unfortunately I need to take this further and have it update/upload the new calendar on its own as well because there is need for this to not be hands-on. Is there a utility for this and is it possible to have more than one utility to process in a single job?
Thank you,
Joshua
Utility for Uploading Calendars
- philmalmaison
- Nouveau
- Posts: 1148
- Joined: 08 Jun 2007 12:00
- Location: Ile de France
Usage:
cli [-U <user_name> [-P <password>] | -PF <password>] -H <Server>
[-T <timeout>] [-DDMM] [-BY_FORCE] <cmd> <cmd> ...
login by supplying username/password combination or a password file name.
<cmd> can be one of the following:
-JOB_ORDER <CTM_name> <table_name> <job_name> <Odate>* <Wait_Odate>*
[<With_Hold>*] [<library>*]
-JOB_FORCE <CTM_name> <table_name> <job_name> <Odate>* <Wait_Odate>*
[<With_Hold>*] [<library>*]
-JOB_ORDER_INTO <CTM_name> <table_name> <job_name> <sched_group>*
[<Duplication>*] <Odate>* <Wait_Odate>* [<With_Hold>*]
[<library>*]
-JOB_FORCE_INTO <CTM_name> <table_name> <job_name> <sched_group>*
[<Duplication>*] <Odate>* <Wait_Odate>* [<With_Hold>*]
[<library>*]
-TABLE_ORDER <CTM_name> <table_name> <Odate>* <Wait_Odate>*
[<With_Hold>*] [<library>*]
-TABLE_FORCE <CTM_name> <table_name> <Odate>* <Wait_Odate>*
[<With_Hold>*] [<library>*]
-TABLE_UPLOAD <CTM_name> <table_name> [<library>*]
-TABLE_DOWNLOAD <CTM_name> <table_name> [<library>*]
-CAL_UPLOAD <CTM_name> <calendar_name>
-CAL_DOWNLOAD <CTM_name> <calendar_name>
-JOB_DELETE <CTM_name> <table_name> <job_name> ALL/NONE/NUMBER
-MEM_DELETE <CTM_name> <table_name> <mem_name> ALL/NONE/NUMBER [<library>*]
-BY_FORCE : Upload (for both calendars and tables) is done with force.
* Comments:
<Odate> can be specified either as MMDD or YYYYMMDD.
<Odate> may also be ODAT for CONTROL-M version 600
or later(Order/Force Table in the Original Scheduling Date)
If the -DDMM is specified, <Odate> can be specified as DDMM or DDMMYYYY.
<sched_group> can be one of the following values -
RECENT - Force Job into the recent scheduling group that was
previously ordered
NEW - Force Job into a new scheduling group
STANDALONE - Force Job as a standalone job
<GroupOrderID> - Force Job into the specified scheduling group
<Duplication> should be specified if <sched_group> is 'RECENT' or
<GroupOrderID>, otherwise, must be omitted.
Specify one of the following values:
[N] - Don't allow duplication of the job.
[Y] - Allow duplication of the job.
<Wait_Odate> is relevant only in case of CONTROL-M for z/OS version 6.2.00
or later and for CONTROL-M for distributed version 6.3.00 or later.
For unsupported versions, this argument must be omitted
Specify one of the following values:
[N] - Run the job immediately.
[Y] - Wait for Odate to run job. (For CONTROL-M for z/OS version 6.2.00 or later)
[Wait_Odate] - Wait for Odate to run job. (For CONTROL-M for distributed version 6.3.00 or later)
<With_Hold> is relevant only in case of version 6.2.01 or later.
For unsupported versions, this argument must be omitted.
Specify one of the following values:
[N] - Order/Force the job in a free state.
[Y or With_Hold] - Order/Force the job in a Hold state.
<library> is mandatory when ordering MVS Jobs.
regards
philmalmaison
cli [-U <user_name> [-P <password>] | -PF <password>] -H <Server>
[-T <timeout>] [-DDMM] [-BY_FORCE] <cmd> <cmd> ...
login by supplying username/password combination or a password file name.
<cmd> can be one of the following:
-JOB_ORDER <CTM_name> <table_name> <job_name> <Odate>* <Wait_Odate>*
[<With_Hold>*] [<library>*]
-JOB_FORCE <CTM_name> <table_name> <job_name> <Odate>* <Wait_Odate>*
[<With_Hold>*] [<library>*]
-JOB_ORDER_INTO <CTM_name> <table_name> <job_name> <sched_group>*
[<Duplication>*] <Odate>* <Wait_Odate>* [<With_Hold>*]
[<library>*]
-JOB_FORCE_INTO <CTM_name> <table_name> <job_name> <sched_group>*
[<Duplication>*] <Odate>* <Wait_Odate>* [<With_Hold>*]
[<library>*]
-TABLE_ORDER <CTM_name> <table_name> <Odate>* <Wait_Odate>*
[<With_Hold>*] [<library>*]
-TABLE_FORCE <CTM_name> <table_name> <Odate>* <Wait_Odate>*
[<With_Hold>*] [<library>*]
-TABLE_UPLOAD <CTM_name> <table_name> [<library>*]
-TABLE_DOWNLOAD <CTM_name> <table_name> [<library>*]
-CAL_UPLOAD <CTM_name> <calendar_name>
-CAL_DOWNLOAD <CTM_name> <calendar_name>
-JOB_DELETE <CTM_name> <table_name> <job_name> ALL/NONE/NUMBER
-MEM_DELETE <CTM_name> <table_name> <mem_name> ALL/NONE/NUMBER [<library>*]
-BY_FORCE : Upload (for both calendars and tables) is done with force.
* Comments:
<Odate> can be specified either as MMDD or YYYYMMDD.
<Odate> may also be ODAT for CONTROL-M version 600
or later(Order/Force Table in the Original Scheduling Date)
If the -DDMM is specified, <Odate> can be specified as DDMM or DDMMYYYY.
<sched_group> can be one of the following values -
RECENT - Force Job into the recent scheduling group that was
previously ordered
NEW - Force Job into a new scheduling group
STANDALONE - Force Job as a standalone job
<GroupOrderID> - Force Job into the specified scheduling group
<Duplication> should be specified if <sched_group> is 'RECENT' or
<GroupOrderID>, otherwise, must be omitted.
Specify one of the following values:
[N] - Don't allow duplication of the job.
[Y] - Allow duplication of the job.
<Wait_Odate> is relevant only in case of CONTROL-M for z/OS version 6.2.00
or later and for CONTROL-M for distributed version 6.3.00 or later.
For unsupported versions, this argument must be omitted
Specify one of the following values:
[N] - Run the job immediately.
[Y] - Wait for Odate to run job. (For CONTROL-M for z/OS version 6.2.00 or later)
[Wait_Odate] - Wait for Odate to run job. (For CONTROL-M for distributed version 6.3.00 or later)
<With_Hold> is relevant only in case of version 6.2.01 or later.
For unsupported versions, this argument must be omitted.
Specify one of the following values:
[N] - Order/Force the job in a free state.
[Y or With_Hold] - Order/Force the job in a Hold state.
<library> is mandatory when ordering MVS Jobs.
regards
philmalmaison
Joshua,
Why don't you just define the z/OS calendars within Control-M, and then simply download them?
I used SAS coding on z/OS to create a file which I downloaded to my PC in order to run the following command:
defcal -u <EM> -p <EM> -s <GUI> -src newcal.xml /o
The SAS coding looks like (NB I am on level 6.2, so it depends on how you have installed the client software on your PC):
filename fmttmp1 '&&tempds1' disp=(new,delete) space=(trk,(1,1));
data _null_;
file ftpout notitle;
infile cal end=eof;
input member $char8.;
i+1;
if i=1 then do;
put '<xml>' /
'<DOCTYPE>' /
' <DEFCAL> ';
end;
put ' <CALENDAR>'/
' <YEAR>'/
' </CALENDAR>';
if eof then put ' </DEFCAL>';
Why don't you just define the z/OS calendars within Control-M, and then simply download them?
I used SAS coding on z/OS to create a file which I downloaded to my PC in order to run the following command:
defcal -u <EM> -p <EM> -s <GUI> -src newcal.xml /o
The SAS coding looks like (NB I am on level 6.2, so it depends on how you have installed the client software on your PC):
filename fmttmp1 '&&tempds1' disp=(new,delete) space=(trk,(1,1));
data _null_;
file ftpout notitle;
infile cal end=eof;
input member $char8.;
i+1;
if i=1 then do;
put '<xml>' /
'<DOCTYPE>' /
' <DEFCAL> ';
end;
put ' <CALENDAR>'/
' <YEAR>'/
' </CALENDAR>';
if eof then put ' </DEFCAL>';