Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to use the below CALL function to call the sub-routine which creates the daily QVD. I want to loop the below call function in such a way that it calls the sub-routine for all the dates of 2013 instead of harding the date value in the CALL function for each date.
CALL DailyQvd ('SOURCE_DATA','YYYYMMDD');
Can someone help me out for this?
LET vNum = DayNumberOfYear(YearEnd('1/1/2013'));
FOR i = 1 TO $(vNum)
LET vDate = date(YearStart('1/1/2013') + $(i) - 1);
CALL DailyQvd('$(vDate)', 'YYYYMMDD');
NEXT
If your second parameter specifies the input date format, change the second LET statement to:
LET vDate = date(YearStart('1/1/2013') + $(i) - 1, 'YYYYMMDD');
Thank you for your effort.
I couldn't see 'SOURCE_DATA' in your script which is my first parameter. Please let me know if it is not clear!
'SOURCE_DATA' is a string constant. I replaced it with a date value for each successive day in 2013.
If the example code doesn't fit your requirements, please explain what parameter values this SUB expects.
Ok, SUB expects below parameter! Please let me know if you have anymore questions.
SUB DailyQvd ('Sales','20130805');
I see. This will do better then:
LET vNum = DayNumberOfYear(YearEnd('1/1/2013'));
FOR i = 1 TO $(vNum)
LET vDate = date(YearStart('1/1/2013') + $(i) - 1, 'YYYYMMDD');
CALL DailyQvd('SOURCE_DATA', '$(vDate)');
NEXT
Thank You!
I will check and update you shortly....