SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Verifing multiple files

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Verifing multiple files
Author Message
ahill



Joined: 02 Mar 2005
Posts: 17

Post Verifing multiple files Reply with quote

I copied the "Verify Overnght Data Feed" example- changed some of the parameters but its not working right-
The script only checks for the first file- not for any after that-
I thought I could have it check for multiple files?
Do I have to break this up into two jobs (don't really want to do that because I have about 20 I want to check)

Any help would be appreciated

// Check data files than arrived erlier.
Dim file_date, date
Dim file_time, time
Dim today, date
Dim now, time
Dim not_found, boolean
Dim file_OK, boolean
Dim date_OK, boolean
Dim time_OK, boolean
Dim file_name, string

Today( today )
Now( now )

CHECK_FTP_GS_SDS:
// Get date/time for Accounts
Set( file_name, "R:\Vendors\posnCustodySDS.txt" )
NotFileExists( file_name, not_found )
IfThen( not_found, BAD_FILE )
FileDate( file_name, file_date )
FileTime( file_name, file_time )

// Check if it is file_OK
IsEqual( file_date, today, date_OK )
IsTimeBetween( file_time, 09:00:00, now, time_OK )
And( date_OK, time_OK, file_OK )
if( file_OK, CHECK_FTP_GS_SDS, BAD_FILE )

CHECK_FTP_GS_NS:
// Get date/time for Accounts
Set( file_name, "R:\Vendors\posnCustodyNS.txt" )
NotFileExists( file_name, not_found )
IfThen( not_found, BAD_FILE )
FileDate( file_name, file_date )
FileTime( file_name, file_time )

// Check if it is file_OK
IsEqual( file_date, today, date_OK )
IsTimeBetween( file_time, 09:00:00, now, time_OK )
And( date_OK, time_OK, file_OK )
if( file_OK, CHECK_FTP_GS_NS, BAD_FILE )

BAD_FILE:
// Inform operation personal about bad file
MailSend( "***", "***", "***@columbusavenue.com", file_name, "Overnight feed failed. File specified in the subject was not updated!" )

DONE:

Wed May 04, 2005 11:28 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Verifing multiple files Reply with quote

The script looks fine. Please run it step-by-step in the job debugger to find where it doesn't work as expected. I suspect it doesn't get to the seconf file because the first file date/time isn't in the specified range.

: I copied the "Verify Overnght Data Feed" example- changed some of
: the parameters but its not working right-
: The script only checks for the first file- not for any after that-
: I thought I could have it check for multiple files?
: Do I have to break this up into two jobs (don't really want to do that
: because I have about 20 I want to check)

: Any help would be appreciated

: // Check data files than arrived erlier.
: Dim file_date, date
: Dim file_time, time
: Dim today, date
: Dim now, time
: Dim not_found, boolean
: Dim file_OK, boolean
: Dim date_OK, boolean
: Dim time_OK, boolean
: Dim file_name, string

: Today( today )
: Now( now )

: CHECK_FTP_GS_SDS: // Get date/time for Accounts
: Set( file_name, "R:\Vendors\posnCustodySDS.txt" )
: NotFileExists( file_name, not_found )
: IfThen( not_found, BAD_FILE )
: FileDate( file_name, file_date )
: FileTime( file_name, file_time )

: // Check if it is file_OK
: IsEqual( file_date, today, date_OK )
: IsTimeBetween( file_time, 09:00:00, now, time_OK )
: And( date_OK, time_OK, file_OK )
: if( file_OK, CHECK_FTP_GS_SDS, BAD_FILE )

: CHECK_FTP_GS_NS: // Get date/time for Accounts
: Set( file_name, "R:\Vendors\posnCustodyNS.txt" )
: NotFileExists( file_name, not_found )
: IfThen( not_found, BAD_FILE )
: FileDate( file_name, file_date )
: FileTime( file_name, file_time )

: // Check if it is file_OK
: IsEqual( file_date, today, date_OK )
: IsTimeBetween( file_time, 09:00:00, now, time_OK )
: And( date_OK, time_OK, file_OK )
: if( file_OK, CHECK_FTP_GS_NS, BAD_FILE )

: BAD_FILE: // Inform operation personal about bad file
: MailSend( "***", "***",
: "***@columbusavenue.com", file_name, "Overnight feed
: failed. File specified in the subject was not updated!" )

: DONE:

Wed May 04, 2005 12:49 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.