Focal Point
[solved]ADD SCHEDULE (First Day of Month) using REST Webservices throwing error

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5547099786

October 12, 2017, 11:50 AM
WFDevConsultant
[solved]ADD SCHEDULE (First Day of Month) using REST Webservices throwing error
Hi,

We are using Custom Scheduler Using REST Webservices and everything works like a charm except when we try to do "First Day of Month". We did see the property for "Last Day of Month" but first day of month needs to use the "Days Of Month" property. We did those changes but still getting "Distribution Error get item". Anyone got that working.

Please share your thoughts.

Thanks

This message has been edited. Last edited by: WFDevConsultant,


8.2.06
Windows, All Formats
October 12, 2017, 11:54 AM
Ian Dalton
This code might help - pick out the one you want......

DEFINE FILE CAR
-* System Date
-*DATEX/YYMD = '2012/10/01';
DATEX/YYMD = '&DATEYYMD';
DATE1/I8YYMD = DATEX;
DATE2/A4 = DOWK(DATE1,DATE2);
DATE3/YYMD = IF DATE2 EQ 'SAT' THEN DATEX + 2 ELSE
IF DATE2 EQ 'SUN' THEN DATEX + 1 ELSE DATEX;
WCD/DMYY = DATE3;
-* Day Current
DAY/DMYY = '&DATEDMYY';
DCA/Wtr = DATEX;
-* Work Day - Prior/Next
WPD/DMYY = DATEMOV(WCD,'PWD');
WND/DMYY = DATEMOV(WCD,'NWD');
-* Business Day - Prior/Next
BPD/DMYY = DATEMOV(WCD,'PBD');
BND/DMYY = DATEMOV(WCD,'NBD');
-* Work Week - Current/Prior/Next
WCS/DMYY = DATEMOV(WCD,'BOW');
WCE/DMYY = DATEMOV(WCD,'EOW');
WPS/DMYY = WCS-7;
WPE/DMYY = WCE-7;
WNS/DMYY = WCS+7;
WNE/DMYY = WCE+7;
-* Month - Current/Prior/Next
MCS/DMYY = DATEMOV(WCD,'BOM');
MCE/DMYY = DATEMOV(WCD,'EOM');
MPS/DMYY = DATEADD(MCS,'M',-1);
MPE/DMYY = DATEMOV(MPS,'EOM');
MNS/DMYY = DATEADD(MCS,'M',+1);
MNE/DMYY = DATEMOV(MNS,'EOM');
-* Month Numeric - Current/Prior/Next
MCN/M = WCD;
MPN/M = MCN-1;
MNN/M = MCN+1;
-* Period - Current/Prior/Next
PCN/M = DATEADD(WCD,'M',+6);
PPN/M = PCN-1;
PNN/M = PCN+1;
-* Quarter - Current/Prior/Next
QCS/DMYY = DATEMOV(WCD,'BOQ');
QCE/DMYY = DATEMOV(WCD,'EOQ');
QPS/DMYY = DATEMOV(DATEADD(WCD,'M',-3),'BOQ');
QPE/DMYY = DATEMOV(DATEADD(WCD,'M',-3),'EOQ');
QNS/DMYY = DATEMOV(DATEADD(WCD,'M',+3),'BOQ');
QNE/DMYY = DATEMOV(DATEADD(WCD,'M',+3),'EOQ');
-* Quarter - Period (Adjusted for Fiscal Year)
QCN/Q = DATEADD(WCD,'M',+6);
QPN/Q = QCN+3;
QNN/Q = QCN+9;
-* Fiscal Year - Current/Prior/Next
FCN/YY = IF DATEADD(WCD,'M',0) LT 7 THEN WCD ELSE DATEADD(WCD,'M',+6);
FPN/YY = FCN-1;
FNN/YY = FCN+1;
FC2/Y = FCN;
FP2/Y = FCN-1;
FN2/Y = FCN+1;
-* Fiscal Year - Current/Prior/Next
FCS/DMYY = DATEADD(DATEMOV(WCD,'BOY'),'M',-6);
FCE/DMYY = DATEADD(DATEMOV(WCD,'BOY'),'M',+6)-1;
FPS/DMYY = DATEADD(FCS,'M',-12);
FPE/DMYY = DATEADD(FCE,'M',-12);
FNS/DMYY = DATEADD(FCS,'M',+12);
FNE/DMYY = DATEADD(FCE,'M',+12);
END
-*******************************************************************************
TABLE FILE CAR
PRINT
DCA AS 'Day,Current,Alpha'
WCD AS 'WorkDay,Today,Numeric'
WPD AS 'WorkDay,Prior,Numeric'
WND AS 'WorkDay,Next,Numeric'
BPD AS 'BusinessDay,Prior,Numeric'
BND AS 'BusinessDay,Next,Numeric'
WPS AS 'Week,Prior,Monday'
WPE AS 'Week,Prior,Friday'
WCS AS 'Week,Current,Monday'
WCE AS 'Week,Current,Friday'
WNS AS 'Week,Next,Monday'
WNE AS 'Week,Next,Friday'
MPS AS 'Month,Prior,1stDay'
MPE AS 'Month,Prior,LastDay'
MCS AS 'Month,Current,1stDay'
MCE AS 'Month,Current,LastDay'
MNS AS 'Month,Next,1stDay'
MNE AS 'Month,Next,LastDay'
MPN AS 'Month,Prior,Integer'
MCN AS 'Month,Current,Integer'
MNN AS 'Month,Next,Integer'
PPN AS 'Period,Prior,Numeric'
PCN AS 'Period,Current,Numeric'
PNN AS 'Period,Next,Numeric'
QPS AS 'Quarter,Prior,1stDay'
QPE AS 'Quarter,Prior,LastDay'
QCS AS 'Quarter,Current,1stDay'
QCE AS 'Quarter,Current,LastDay'
QNS AS 'Quarter,Next,1stDay'
QNE AS 'Quarter,Next,LastDay'
QPN AS 'Quarter,Prior,Numeric'
QCN AS 'Quarter,Current,Numeric'
QNN AS 'Quarter,Next,Numeric'
FPN AS 'FiscalYear,Prior,Year'
FCN AS 'FiscalYear,Current,Year'
FNN AS 'FiscalYear,Next,Year'
FP2 AS 'FiscalYear,Prior,Year2'
FC2 AS 'FiscalYear,Current,Year2'
FN2 AS 'FiscalYear,Next,Year2'
FPS AS 'FiscalYear,Prior,1stDay'
FPE AS 'FiscalYear,Prior,LastDay'
FCS AS 'FiscalYear,Current,1stDay'
FCE AS 'FiscalYear,Current,LastDay'
FNS AS 'FiscalYear,Next,1stDay'
FNE AS 'FiscalYear,Next,LastDay'
BY COUNTRY NOPRINT
IF RECORDLIMIT EQ 1
END
-RUN


_______________________
*** WebFOCUS 8.1.05M ***
October 12, 2017, 01:29 PM
WFDevConsultant
We are creating the schedule using REST webservices. That uses the Master file which we created using an XML.


8.2.06
Windows, All Formats
October 12, 2017, 03:26 PM
WFDevConsultant
We found the solution. After we added the DaysOfMonth group and increase the element count on Time_Monthly, it worked.


8.2.06
Windows, All Formats
October 13, 2017, 04:27 AM
Ian Dalton
Glad you sorted it.


_______________________
*** WebFOCUS 8.1.05M ***