SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Memory Cache?

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Memory Cache?
Author Message
Melissa Herosy



Joined: 28 Jun 2000
Posts: 2

Post Memory Cache? Reply with quote

We are evaluating 24 x 7 for ftp-ing some files from unix to NT to a mainframe. As the files are placed in a new folder, we are deleting them in the first folder. However, there seems to be a memory cache that tries to find the previous file when the scheduler runs the job again. It cannot find the file and errors out.

The code is below:

Thank you for your help.

Dim file_name, string, NULL
Dim found, boolean, NULL
Dim RL_file_name, string, NULL
Dim CMS_file_name, string, NULL
Dim Server_file_name, string, NULL
Dim Archive_file_name, string, NULL

// Start file search

// Watch for file on remote FTP site.

SyncFTPDir( "REMOTE", "unix", "login", "pw", "cms/interface/out/", "c://interface//stage//";, true, false, false, false )

FileFindFirst( "c://interface//stage//C*.RL", file_name, found )

LoopWhile( found, END_LOOP )

concat("INTERFAC.", file_name, RL_file_name)

concat("c://interface//stage//";, file_name, Server_file_name)

concat("cms/interface/out/", file_name, CMS_file_name)

concat("c://interface//archive//";, file_name, Archive_file_name)

// FTPConfig( "SITE", "lrecl=700 blksize=4096 recfm=Vb" )

FTPPutFile( "mainframe.us.chep.com", "login", "pw", Server_file_name, RL_file_name)

FTPDeleteFile( "unix", "login", "pw", CMS_file_name )

FileCopy( Server_file_name, Archive_file_name)

FileDelete( Server_file_name )

FIND_NEXT:

// Find next file

FileFindNext( file_name, found )

END_LOOP:

Tue Jun 27, 2000 8:36 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7907

Post Re: Memory Cache? Reply with quote

There are numerous syntax errors in your script that should prevent it from working correctly, some of them are:
- extra semicolon in SyncFTPDir and other lines
- local files (NT) should use single backslash as a path name separator and not double forward slash
- extra spaces in file names ( for example see FileFindFirst -
" c://interface//stage//C *.RL"

You may want to run your script in the Debugger using Step mode in order to see
how your variables get changed.

: We are evaluating 24 x 7 for ftp-ing some files from unix to NT to a
: mainframe. As the files are placed in a new folder, we are deleting them
: in the first folder. However, there seems to be a memory cache that tries
: to find the previous file when the scheduler runs the job again. It cannot
: find the file and errors out.

: The code is below: Thank you for your help.

: Dim file_name, string, NULL
: Dim found, boolean, NULL
: Dim RL_file_name, string, NULL
: Dim CMS_file_name, string, NULL
: Dim Server_file_name, string, NULL
: Dim Archive_file_name, string, NULL

: // Start file search

: // Watch for file on remote FTP site.

: SyncFTPDir( "REMOTE", "unix", "login",
: "pw", "cms/interface/out/", "
: c://interface//stage//"; ;, true, false, false, false )

: FileFindFirst( " c://interface//stage//C *.RL", file_name, found )

: LoopWhile( found, END_LOOP )

: concat("INTERFAC.", file_name, RL_file_name)

: concat(" c://interface//stage//"; ;, file_name, Server_file_name)

: concat("cms/interface/out/", file_name, CMS_file_name)

: concat(" c://interface//archive//"; ;, file_name, Archive_file_name)

: // FTPConfig( "SITE", "lrecl=700 blksize=4096 recfm=Vb" )

: FTPPutFile( "mainframe.us.chep.com", "login",
: "pw", Server_file_name, RL_file_name)

: FTPDeleteFile( "unix", "login", "pw",
: CMS_file_name )

: FileCopy( Server_file_name, Archive_file_name)

: FileDelete( Server_file_name )

: FIND_NEXT: // Find next file

: FileFindNext( file_name, found )

: END_LOOP:

Wed Jun 28, 2000 10:28 am View user's profile Send private message
Melissa Herosy



Joined: 28 Jun 2000
Posts: 2

Post Re: Memory Cache? Reply with quote

I'm not sure how it happened, but the spaces and semicolons got added when I cut and paste the script. They do not exist in the actual script itself. Sorry for the confusion. Regardless, we will test the path name separator change.

However, the script ran fine the first few times, but it failed yesterday trying to delete a record that no longer existed, and yet it continues to look for the record today (after the machine has been rebooted). Where does it store the old command? Is there any way to clear that out?

Thank you,

Melissa

: There are numerous syntax errors in your script that should prevent it from
: working correctly, some of them are: - extra semicolon in SyncFTPDir and
: other lines
: - local files (NT) should use single backslash as a path name separator and
: not double forward slash
: - extra spaces in file names ( for example see FileFindFirst -
: " c://interface//stage//C *.RL"

: You may want to run your script in the Debugger using Step mode in order to
: see
: how your variables get changed.

Wed Jun 28, 2000 7:08 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7907

Post Re: Memory Cache? Reply with quote

What do you mean by "Delete a record"? Is this FTPDeleteFile or FileDelete?

In you script you search for local files and delete matchning files on the mainframe site. If the mainframe file does not exist, the job will fail and leave the local file in place. So that the next time this job runs it will find the local file again and so it will fail again if there is still no matching mainframe file.

Consider the following workarounds:
1. Enable "ignore errors" property to allow this job to resume after an error (the downside is that you may have difficulties catching real problems)
2. Put some logic to check for a mainframe file before deleting it.
If FTPFileExists returns True, you would delete the file, otherwise you would skip FTPFileDelete operation.

: I'm not sure how it happened, but the spaces and semicolons got added when I
: cut and paste the script. They do not exist in the actual script itself.
: Sorry for the confusion. Regardless, we will test the path name separator
: change.

: However, the script ran fine the first few times, but it failed yesterday
: trying to delete a record that no longer existed, and yet it continues to
: look for the record today (after the machine has been rebooted). Where
: does it store the old command? Is there any way to clear that out?

: Thank you,

: Melissa

Wed Jun 28, 2000 10:21 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.