Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COGNOS Script to modify date ranges on a Dimension

Status
Not open for further replies.

dredden2

Programmer
Jun 16, 2017
1
0
0
US
I am currently using Cognos 10.2.1.
I am looking for a way to pass a value based off of today's date through to my code below:

Code:
     OpenPy "\\path_to_my_file\filename.pyj"
     DimUpdate "DimensionName"
     DimType Date EarliestDate 20170101      
     SavePy "\\path_to_my_file\filename.pyj"

I cannot figure out IBM's language to do this. I have searched high/low on IBM's site but cannot seem to figure out an automated way to do this.

Ultimately something like this; but %let does not work:

Code:
 %let earlydate=today()-730;
     
     OpenPy "\\path_to_my_file\filename.pyj"
     DimUpdate "DimensionName"
     DimType Date EarliestDate &earlyldate 
     SavePy "\\path_to_my_file\filename.pyj"

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top