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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win Fiol Scripting

Status
Not open for further replies.

alchohaz

Technical User
Mar 25, 2004
216
GB

I am trying to set up a script to run traffic reports on a schedule. I need to define the start date as different to actual date the process will run.

I have tried the following but this has failed, can anybody point me in the right direction?

@GETDATE {date} YYYY-MM-DD
@GETTIME {time} HH-MM

@SET {START} = {date}-8
@SET {END} = {date}-1

trrep:meno=12,date={start}&&{end},period=2;

Cheers
Al



[red]Striker : My orders came through. My squadron ships out tomorrow, we're bombing the storage depots at Daiquiri at 18:00 hours. We're coming in from the North, below their radar.[/red]
[blue]Elaine : When will you be back?[/blue]
[red]Striker : I can't tell you that? It's classified.[/red]
 
Hi,

Use the SCHEDULE option...

Shift-F2 or Choose the menu RUN, SCHEDULE FILE...

You can also use menu OPTIONS, SCHEDULE to change settings.

Regards
Isinor
 
Isinor I think you have missed my point. I am aware of the Schedule feature, my question relates to the SCRIPTING of the transmit file.

I am trying to set/adjust the variable for the date.
[blue]
@GETDATE {date} YYYY-MM-DD
@GETTIME {time} HH-MM

@SET {START} = {date}-8
@SET {END} = {date}-1
[/blue]
trrep:meno=12,date={start}&&{end},period=2;

This is what i have used but i know it is wrong, i am trying to set variables "start" to be the current date minus 8 days and "end" be the current date minus 1 day.



Thanks for your help
Al

[red]Striker : My orders came through. My squadron ships out tomorrow, we're bombing the storage depots at Daiquiri at 18:00 hours. We're coming in from the North, below their radar.[/red]
[blue]Elaine : When will you be back?[/blue]
[red]Striker : I can't tell you that? It's classified.[/red]
 


Someone.. Please !!!



[red]Striker : My orders came through. My squadron ships out tomorrow, we're bombing the storage depots at Daiquiri at 18:00 hours. We're coming in from the North, below their radar.[/red]
[blue]Elaine : When will you be back?[/blue]
[red]Striker : I can't tell you that? It's classified.[/red]
 
Hi Al,

It might be due to the ‘date format string’ including the – char. This would cause the date var to be text (not a number). So you cannot do any maths.

From WinFIOL Help…
There are two types of variables, numeric and text. Numeric variables can have a value between -2147483647 and +2147483648. Text variables can have a maximum length of 80 characters. The type of variable is determined when assigning a value to it. At any time, if a numeric value is assigned to a variable, it becomes a numeric variable.

Text variables can only be combined with normal text by using the plus sign (+). Numeric values can use the following operators:

Addition {year} + 1900
Subtraction {dev} - 128
Multiplication 32 * {snt}
Division {dev} / 16
And operation {dev} & h'F
Or operation {bm} | h'8000


You could try something like…

@GETDATE {date} YYYYMMDD
@COPY {date} {year} 1 4
@COPY {date} {month} 5 2
@COPY {date} {day} 7 2
@SET {start} = {day} - 8
@SET {end} = {day} - 1
TRREP:MENO=12,DATE={year}-{month}-{start}&&{year}-{month}-{end},PERIOD=2;

Not sure about COPY if it zero counts chars or not. I don’t have access to a MD110 to test out the script.

Regards
Isinor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top