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

Run Function Failure Problem 1

Status
Not open for further replies.

clk430

Programmer
Sep 21, 2005
235
US
The management console has been showing many function failures for years and I’ve pinpointed the code/card that produces them. Output Card #2 and #6 produce a “failed at run function,” argument “MyGetFTP” and reason 12 – Source not available.


The map is on a time event every 5 minutes and can pulls multiple files from a server and builds the file (one) in a staging folder.


Output 1 CmgrFileName 1:="841ci.d" +
WORD(DATETOTEXT(CURRENTDATE()),"/",3) + WORD(DATETOTEXT(CURRENTDATE()),"/",1) + WORD(DATETOTEXT(CURRENTDATE()),"/",2) + ".t" + LEAVEALPHANUM(TIMETOTEXT(CURRENTTIME())) + ".mi.ppi"

Output 2 ClearStaging:=RUN("MyGetFTP.mmc", "-WM -IF1X 'E:\mercator6.7\cmgr\mmgr\staging\" + CMgrFileName +
"' -OASINK1 -OASINK2 ")

Output 3: FTP Lookup

Output 4: FTP functional maps calls

Output 5: Create Logs

Output 6:=RUN("MyGetFTP.mmc", "-WM -IF1X 'E:\mercator6.7\cmgr\mmgr\staging\" + CMgrFileName + "' -OF1X0 'E:\mercator6.7\cmgr\mmgr\mail\" + CMgrFileName + "' -OE2")


So basically, it seems as though on a time event, if there are no files on their server, output card 2 erros. If there are files, 2 and 6 both error, I suspect since the staging folder is building and the file is not datetimestamped to release?

Any solutions for card 2 and 6?

Also, this staging folder that builds the files sometimes completes (datetimestamp official), but the map never clears the folder. Not sure if this is related.
 
Files could be locked, but what are the chances that this happens every time?

Does this same map produce the files that the RUN map is looking for? If so, you might need to commit by card. (scope of card is card). Don't know what this would do to your transactional integrity.

Did this work in Q/A?



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
These soft errors (card 2) happen every time the map triggers on it's time event. Card 2 & 6 seem to error when a file is actually being pulled and built. I say soft errors, because this system works. It actually pulls in 5000+ files a day. But once or twice a day, the file just won't clear the staging folder - thus requiring bouncing the service.

And not sure if it worked in Q/A (I wasn't here), but the Dev system generates these errors as well.

This map does produce the file that the run map is looking for. How can I commit by card in the overide?

 
You don't. If the RUN map uses data(files) from a previous card, you would need to change the scope of that card to card. This way, the files would be committed (and not locked) before the RUN map gets called.

As described, it appears the system needs some redesign.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Gotcha. But what about the second card when there is no data? Because, the map is on a time event to check thier server, so if there is no file, then how can I stop the error on card #2?
 
You can't. If the map expects a file and it's not there, that is an error. You might set the input to be optional in the tree, but this could mess up validation.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
You could perform an FTP get a list of the objects in the directory, review the list to see if what you need is present, then execute maps accordingly.

Check you file name in output card #1. Are you getting ':' in the file name? Probably not but....

Have you turned on the FTP tracing to see if you get more information about the failure? If you turn it on use the verbose method for testing so you capture infor on both map executions.

Does the ftp runmap only have 1 input card? If not are you sure its the FTP resource thats unavail?

Also, assuming you never want to run the second map if the first run fails, you could check the return code from the first execution of the run map to see if you need to execute the second. Change your rule in output card #2 to valid(run("......), fail(....)). Then output card 6 to if (present(output 2 ) & output 2 != "0", none, run(....)


PS: Like the other map... this rule ....

WORD(DATETOTEXT(CURRENTDATE()),"/",3) + WORD(DATETOTEXT(CURRENTDATE()),"/",1) + WORD(DATETOTEXT(CURRENTDATE()),"/",2)

could look like

fromdatetime(currentdate(), "ccyymmdd")

or

fromdatetime(currentdate(), "mmddccyy")



 
I've tried all those eyetry, but the errors still happen. I'll play with is some more and will let you know. Thanks for the tips.

I did have a question though regarding the run maps:

The "MyGetFTP.mmc" run map is referenced 3 times in this map. It is also referenced in 6 other idenetical maps (3 times in each). When all these maps run thoughout the day, they pull a total of about 6,000 files in.

Furthemore, this run map is also used by other maps and systems.

Can this run map be overutilized? How many instances of this map can be run?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top