infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
Delay in stopping thread
Paul Bishop
Cloverleaf version 6.1.1 on AIX.
We are sometimes having an issue with a script (ksh) that we run to stop a thread that is writing to a file, doing something with that file including moving it, and then starting the thread back up for the next day's processing. What is happening is that the pstop command is issued, the file processing is done, the pstart command is issued, then the pstop command is finally processed by the engine. This leaves the thread not running for the next day's process and the file not generated.
My question - besides putting in a sleep command after the pstop (5 seconds would do it), is there a way to have the script wait until the command has been processed?
I thought of writing a TCL script that does the stop and then doesn't return control until the command has been processed (and throw a time limit in to keep infinite loops away), determined by looking at the thread status.
Thanks,
Find more posts tagged with
Clovertech
Comments
Austin Adams
You could write a TCL script that loops through and check the initial file size, sleep about 3 seconds, and then check it again. If the file size matches or if the file has already been moved then check to see if the file exists, then you would issue the pstop command. If it does not match, you would loop through again.
I think a script would be the best way to handle it. Although, I have used Alerts to do some kind of checking like check the last read message time or checking the up time of a thread and have it execute a command to stop or start a thread.
emastascusa
you could try the "prestart" in place of the pstop then no need for the pstart - I think prestart is just a pstop on the front end anyway - just make sure your time param is fairly large, if you think 5 go with 10.