[U2] Stumped on a WRITE failure
Hi folks, I have a UNIDATA program that is being run from a Windows Task Schedule entry that is failing on a WRITE statement and I'm having a heck of a time figuring out why. Here are some key observations and discoveries so far: - The WRITE statement has an ON ERROR that is not being executed. - Just before the WRITE statement, FILEINFO shows the file is OPEN and has a permissions value of 6 (R/W). - It does not always fail but when it does fail, it will continue to fail on that input file every time the program is run from the Windows Scheduler. - If I run the program directly, from my logged in session, it works perfectly every time. - Every tool I have says there is nothing wrong with the file I'm writing into. - There are 3 indexes on this file but they are all flagged to allow duplicates. - There are 2 triggers on this file that monitor and report for specific record ID's. (Very basic/simple logic.) I've pretty much exhausted ways, and things, that I know of to check for. This is a very specific problem that is somehow related to the data that is being processed. Can anyone think of something else I can check for? Thanks for your thoughts, Bob W ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stumped on a WRITE failure
Bob, Can you re-create the error on demand (from the Scheduler) or is it random? Have you tried capturing anything with a COMO? Are these on NEW records, existing records or both? Are the indexes being updated to reflect the writes even if the primary file is not? JRI -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Woodward, Bob Sent: Friday, August 16, 2013 1:09 PM To: U2 Users List Subject: [U2] Stumped on a WRITE failure Hi folks, I have a UNIDATA program that is being run from a Windows Task Schedule entry that is failing on a WRITE statement and I'm having a heck of a time figuring out why. Here are some key observations and discoveries so far: - The WRITE statement has an ON ERROR that is not being executed. - Just before the WRITE statement, FILEINFO shows the file is OPEN and has a permissions value of 6 (R/W). - It does not always fail but when it does fail, it will continue to fail on that input file every time the program is run from the Windows Scheduler. - If I run the program directly, from my logged in session, it works perfectly every time. - Every tool I have says there is nothing wrong with the file I'm writing into. - There are 3 indexes on this file but they are all flagged to allow duplicates. - There are 2 triggers on this file that monitor and report for specific record ID's. (Very basic/simple logic.) I've pretty much exhausted ways, and things, that I know of to check for. This is a very specific problem that is somehow related to the data that is being processed. Can anyone think of something else I can check for? Thanks for your thoughts, Bob W ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://cp.mcafee.com/d/1jWVIpdEIzD71OpEVusdTdEThjvKztcQsCQrEFLThjhd79J6WarZQrITdEThjd7bXb31EVdydis9kzLDwF3iQWMESJYplzOVJ3iQWMESJYplzOVJV2P_TjvW_8FELLcLZuVtdcsZO8VMQsFLzKmKzp5dmWbfaxVZicHs3jq9J4TsTsS03fBitfyp-fdFJAu00U9GX33VkDa3JsrjbJQ-d3rqptKDNEn8lrxrW0E-l9Q-9DUYSCShU02rp7fLCPiS4QPiWq81yrqGTE6y2I3h1FEw0k5xE96zh0XIzSU-rKrg9A6 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stumped on a WRITE failure
Can you trace the process using the SysInternals tools? Sent from my iPhone On 16 Aug 2013, at 18:09, Woodward, Bob bob_woodw...@k2sports.com wrote: Hi folks, I have a UNIDATA program that is being run from a Windows Task Schedule entry that is failing on a WRITE statement and I'm having a heck of a time figuring out why. Here are some key observations and discoveries so far: - The WRITE statement has an ON ERROR that is not being executed. - Just before the WRITE statement, FILEINFO shows the file is OPEN and has a permissions value of 6 (R/W). - It does not always fail but when it does fail, it will continue to fail on that input file every time the program is run from the Windows Scheduler. - If I run the program directly, from my logged in session, it works perfectly every time. - Every tool I have says there is nothing wrong with the file I'm writing into. - There are 3 indexes on this file but they are all flagged to allow duplicates. - There are 2 triggers on this file that monitor and report for specific record ID's. (Very basic/simple logic.) I've pretty much exhausted ways, and things, that I know of to check for. This is a very specific problem that is somehow related to the data that is being processed. Can anyone think of something else I can check for? Thanks for your thoughts, Bob W ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stumped on a WRITE failure
Did you check the udterrorlog? We saw similar issues (although we didn't have an on error clause) when running a scheduled process overnight and it conflicted with the backup. The backup would lock the file at the operating system level and UniData would error out at the write statement (we could see it in the _PH_ file). Good luck Colin -Original Message- From: Woodward, Bob Sent: Friday, August 16, 2013 11:09 AM To: U2 Users List Subject: [U2] Stumped on a WRITE failure Hi folks, I have a UNIDATA program that is being run from a Windows Task Schedule entry that is failing on a WRITE statement and I'm having a heck of a time figuring out why. Here are some key observations and discoveries so far: - The WRITE statement has an ON ERROR that is not being executed. - Just before the WRITE statement, FILEINFO shows the file is OPEN and has a permissions value of 6 (R/W). - It does not always fail but when it does fail, it will continue to fail on that input file every time the program is run from the Windows Scheduler. - If I run the program directly, from my logged in session, it works perfectly every time. - Every tool I have says there is nothing wrong with the file I'm writing into. - There are 3 indexes on this file but they are all flagged to allow duplicates. - There are 2 triggers on this file that monitor and report for specific record ID's. (Very basic/simple logic.) I've pretty much exhausted ways, and things, that I know of to check for. This is a very specific problem that is somehow related to the data that is being processed. Can anyone think of something else I can check for? Thanks for your thoughts, Bob W ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stumped on a WRITE failure
Hi John, It is random and I've not been able to identify a common indicator between the files that work and the ones that don't. The source files are coming in from the other side of the world so it's happening in the very early hours of the morning. By the time I get in, the scheduler has tried to run the program on the bad file a couple of times. I've not tried using COMO, yet. This is exactly why I like this list so much. I'll put this in right away. I'll dig into the udterrorlog file, too, as Colin suggests. Thanks! -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Israel, John R. Sent: Friday, August 16, 2013 10:17 AM To: U2 Users List Subject: Re: [U2] Stumped on a WRITE failure Bob, Can you re-create the error on demand (from the Scheduler) or is it random? Have you tried capturing anything with a COMO? Are these on NEW records, existing records or both? Are the indexes being updated to reflect the writes even if the primary file is not? JRI -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Woodward, Bob Sent: Friday, August 16, 2013 1:09 PM To: U2 Users List Subject: [U2] Stumped on a WRITE failure Hi folks, I have a UNIDATA program that is being run from a Windows Task Schedule entry that is failing on a WRITE statement and I'm having a heck of a time figuring out why. Here are some key observations and discoveries so far: - The WRITE statement has an ON ERROR that is not being executed. - Just before the WRITE statement, FILEINFO shows the file is OPEN and has a permissions value of 6 (R/W). - It does not always fail but when it does fail, it will continue to fail on that input file every time the program is run from the Windows Scheduler. - If I run the program directly, from my logged in session, it works perfectly every time. - Every tool I have says there is nothing wrong with the file I'm writing into. - There are 3 indexes on this file but they are all flagged to allow duplicates. - There are 2 triggers on this file that monitor and report for specific record ID's. (Very basic/simple logic.) I've pretty much exhausted ways, and things, that I know of to check for. This is a very specific problem that is somehow related to the data that is being processed. Can anyone think of something else I can check for? Thanks for your thoughts, Bob W ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://cp.mcafee.com/d/1jWVIpdEIzD71OpEVusdTdEThjvKztcQsCQrEFLThjhd79J6W arZQrITdEThjd7bXb31EVdydis9kzLDwF3iQWMESJYplzOVJ3iQWMESJYplzOVJV2P_TjvW_ 8FELLcLZuVtdcsZO8VMQsFLzKmKzp5dmWbfaxVZicHs3jq9J4TsTsS03fBitfyp-fdFJAu00 U9GX33VkDa3JsrjbJQ-d3rqptKDNEn8lrxrW0E-l9Q-9DUYSCShU02rp7fLCPiS4QPiWq81y rqGTE6y2I3h1FEw0k5xE96zh0XIzSU-rKrg9A6 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stumped on a WRITE failure
Beat me to it Brian. Use the process monitor from the says internals tool set to filter out all executables except the one you want to monitor. This could either be the specific process or (I think) the task scheduler process itself and include child processes. Once you get a failure, save the monitor status from processmonitor to freeze the state and open it as a log file. The filters will then allow you to drill down to identify events? There are some excellent books on the says internals tools on Amazon (and other book stores ;-' ) that I found very useful. Regards, JayJay On 16 Aug 2013, at 18:16, Brian Leach br...@brianleach.co.uk wrote: Can you trace the process using the SysInternals tools? Sent from my iPhone On 16 Aug 2013, at 18:09, Woodward, Bob bob_woodw...@k2sports.com wrote: Hi folks, I have a UNIDATA program that is being run from a Windows Task Schedule entry that is failing on a WRITE statement and I'm having a heck of a time figuring out why. Here are some key observations and discoveries so far: - The WRITE statement has an ON ERROR that is not being executed. - Just before the WRITE statement, FILEINFO shows the file is OPEN and has a permissions value of 6 (R/W). - It does not always fail but when it does fail, it will continue to fail on that input file every time the program is run from the Windows Scheduler. - If I run the program directly, from my logged in session, it works perfectly every time. - Every tool I have says there is nothing wrong with the file I'm writing into. - There are 3 indexes on this file but they are all flagged to allow duplicates. - There are 2 triggers on this file that monitor and report for specific record ID's. (Very basic/simple logic.) I've pretty much exhausted ways, and things, that I know of to check for. This is a very specific problem that is somehow related to the data that is being processed. Can anyone think of something else I can check for? Thanks for your thoughts, Bob W ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stumped on a WRITE failure
We have not installed these tools. Not sure they could help as I'm not able to generate the problem, yet. I've read where others were talking about SysInternals but never got around to really checking it out. Thanks. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brian Leach Sent: Friday, August 16, 2013 10:17 AM To: U2 Users List Subject: Re: [U2] Stumped on a WRITE failure Can you trace the process using the SysInternals tools? Sent from my iPhone On 16 Aug 2013, at 18:09, Woodward, Bob bob_woodw...@k2sports.com wrote: Hi folks, I have a UNIDATA program that is being run from a Windows Task Schedule entry that is failing on a WRITE statement and I'm having a heck of a time figuring out why. Here are some key observations and discoveries so far: - The WRITE statement has an ON ERROR that is not being executed. - Just before the WRITE statement, FILEINFO shows the file is OPEN and has a permissions value of 6 (R/W). - It does not always fail but when it does fail, it will continue to fail on that input file every time the program is run from the Windows Scheduler. - If I run the program directly, from my logged in session, it works perfectly every time. - Every tool I have says there is nothing wrong with the file I'm writing into. - There are 3 indexes on this file but they are all flagged to allow duplicates. - There are 2 triggers on this file that monitor and report for specific record ID's. (Very basic/simple logic.) I've pretty much exhausted ways, and things, that I know of to check for. This is a very specific problem that is somehow related to the data that is being processed. Can anyone think of something else I can check for? Thanks for your thoughts, Bob W ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stumped on a WRITE failure
Bob, If you are loading data from an outside source, might you be grabbing a data file that is not 100% written to disk? I have seen this a number of times. The 2 solutions to this that I recommend are either: 1) look for a 2nd file that indicates the 1st is 100% complete (be sure to delete the stub file after processing) or 2) look at the size or date/time of the data file, sleep for 10 seconds, then look again. Repeat this process until the criteria does not change Might or might not be applicable in your case. JRI -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Woodward, Bob Sent: Friday, August 16, 2013 2:05 PM To: U2 Users List Subject: Re: [U2] Stumped on a WRITE failure Hi John, It is random and I've not been able to identify a common indicator between the files that work and the ones that don't. The source files are coming in from the other side of the world so it's happening in the very early hours of the morning. By the time I get in, the scheduler has tried to run the program on the bad file a couple of times. I've not tried using COMO, yet. This is exactly why I like this list so much. I'll put this in right away. I'll dig into the udterrorlog file, too, as Colin suggests. Thanks! -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Israel, John R. Sent: Friday, August 16, 2013 10:17 AM To: U2 Users List Subject: Re: [U2] Stumped on a WRITE failure Bob, Can you re-create the error on demand (from the Scheduler) or is it random? Have you tried capturing anything with a COMO? Are these on NEW records, existing records or both? Are the indexes being updated to reflect the writes even if the primary file is not? JRI -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Woodward, Bob Sent: Friday, August 16, 2013 1:09 PM To: U2 Users List Subject: [U2] Stumped on a WRITE failure Hi folks, I have a UNIDATA program that is being run from a Windows Task Schedule entry that is failing on a WRITE statement and I'm having a heck of a time figuring out why. Here are some key observations and discoveries so far: - The WRITE statement has an ON ERROR that is not being executed. - Just before the WRITE statement, FILEINFO shows the file is OPEN and has a permissions value of 6 (R/W). - It does not always fail but when it does fail, it will continue to fail on that input file every time the program is run from the Windows Scheduler. - If I run the program directly, from my logged in session, it works perfectly every time. - Every tool I have says there is nothing wrong with the file I'm writing into. - There are 3 indexes on this file but they are all flagged to allow duplicates. - There are 2 triggers on this file that monitor and report for specific record ID's. (Very basic/simple logic.) I've pretty much exhausted ways, and things, that I know of to check for. This is a very specific problem that is somehow related to the data that is being processed. Can anyone think of something else I can check for? Thanks for your thoughts, Bob W ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://cp.mcafee.com/d/1jWVIpdEIzD71OpEVusdTdEThjvKztcQsCQrEFLThjhd79J6W arZQrITdEThjd7bXb31EVdydis9kzLDwF3iQWMESJYplzOVJ3iQWMESJYplzOVJV2P_TjvW_ 8FELLcLZuVtdcsZO8VMQsFLzKmKzp5dmWbfaxVZicHs3jq9J4TsTsS03fBitfyp-fdFJAu00 U9GX33VkDa3JsrjbJQ-d3rqptKDNEn8lrxrW0E-l9Q-9DUYSCShU02rp7fLCPiS4QPiWq81y rqGTE6y2I3h1FEw0k5xE96zh0XIzSU-rKrg9A6 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://cp.mcafee.com/d/2DRPosd2gQrhp7ee3D4THCXCQrEFLThKCqejqdQkTXEFECzASzt5d-WdSrCQrEFCzBZBxwQsCN6Fe4GhTPMkxFqtokrm-cGNVsSxFqtokrm-cGNVsSe86zBPXFLZvATC7zhOyDRXBQkQT-ojohjd7b_bnhIyyHsQsEYG7DR8OJMddECSjtPtPo0c-l9Q-9DUYSCShU03wCHIcfBisEeRNJcKTjUQdJFBSWv6xsxlK5LE2zVkDjUCvzPqrp7w09JZNNMS2_id41Fr2qpFtd40NdJlrQ3h1m1EwQQg0a2MQ4zhEwtShXsvdTdDo5ApJT-v9f ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://cp.mcafee.com/d/5fHCMUg40USyOess7e9LndTdEThjvKztcQsCQrEFLThjhd79J6WarZQrITdEThjd7bXb31EVdydis9kzLDwF3iQWMESJYplzOVJ3iQWMESJYplzOVIsgd7bDTjvW_9Lcf6zB5fHTbEFFLYMCMyCqen-mKzp55mVEVhVkffGhBrwqrjdICXCXCM0pYGjFYjfNVJdIzM071dnoovaAVgtHzqptKDNErrjbJQ-d2V2Hsbvg57OFeDNc_7CQSOf00jrXzzxI5-Aq83iS4QPiWq81yrqGTE6y2I3h1FEw0k5xE96zh0XIzSU-rKrdd0eOZzx ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stumped on a WRITE failure
Hi John, Not applicable in this case. The scheduler runs the program every two hours. The files are staged from another server via an OS level COPY and are only something like 5 to 20k. Good thought, though. Thanks. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Israel, John R. Sent: Friday, August 16, 2013 11:12 AM To: U2 Users List Subject: Re: [U2] Stumped on a WRITE failure Bob, If you are loading data from an outside source, might you be grabbing a data file that is not 100% written to disk? I have seen this a number of times. The 2 solutions to this that I recommend are either: 1) look for a 2nd file that indicates the 1st is 100% complete (be sure to delete the stub file after processing) or 2) look at the size or date/time of the data file, sleep for 10 seconds, then look again. Repeat this process until the criteria does not change Might or might not be applicable in your case. JRI -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Woodward, Bob Sent: Friday, August 16, 2013 2:05 PM To: U2 Users List Subject: Re: [U2] Stumped on a WRITE failure Hi John, It is random and I've not been able to identify a common indicator between the files that work and the ones that don't. The source files are coming in from the other side of the world so it's happening in the very early hours of the morning. By the time I get in, the scheduler has tried to run the program on the bad file a couple of times. I've not tried using COMO, yet. This is exactly why I like this list so much. I'll put this in right away. I'll dig into the udterrorlog file, too, as Colin suggests. Thanks! -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Israel, John R. Sent: Friday, August 16, 2013 10:17 AM To: U2 Users List Subject: Re: [U2] Stumped on a WRITE failure Bob, Can you re-create the error on demand (from the Scheduler) or is it random? Have you tried capturing anything with a COMO? Are these on NEW records, existing records or both? Are the indexes being updated to reflect the writes even if the primary file is not? JRI -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Woodward, Bob Sent: Friday, August 16, 2013 1:09 PM To: U2 Users List Subject: [U2] Stumped on a WRITE failure Hi folks, I have a UNIDATA program that is being run from a Windows Task Schedule entry that is failing on a WRITE statement and I'm having a heck of a time figuring out why. Here are some key observations and discoveries so far: - The WRITE statement has an ON ERROR that is not being executed. - Just before the WRITE statement, FILEINFO shows the file is OPEN and has a permissions value of 6 (R/W). - It does not always fail but when it does fail, it will continue to fail on that input file every time the program is run from the Windows Scheduler. - If I run the program directly, from my logged in session, it works perfectly every time. - Every tool I have says there is nothing wrong with the file I'm writing into. - There are 3 indexes on this file but they are all flagged to allow duplicates. - There are 2 triggers on this file that monitor and report for specific record ID's. (Very basic/simple logic.) I've pretty much exhausted ways, and things, that I know of to check for. This is a very specific problem that is somehow related to the data that is being processed. Can anyone think of something else I can check for? Thanks for your thoughts, Bob W ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://cp.mcafee.com/d/1jWVIpdEIzD71OpEVusdTdEThjvKztcQsCQrEFLThjhd79J6W arZQrITdEThjd7bXb31EVdydis9kzLDwF3iQWMESJYplzOVJ3iQWMESJYplzOVJV2P_TjvW_ 8FELLcLZuVtdcsZO8VMQsFLzKmKzp5dmWbfaxVZicHs3jq9J4TsTsS03fBitfyp-fdFJAu00 U9GX33VkDa3JsrjbJQ-d3rqptKDNEn8lrxrW0E-l9Q-9DUYSCShU02rp7fLCPiS4QPiWq81y rqGTE6y2I3h1FEw0k5xE96zh0XIzSU-rKrg9A6 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://cp.mcafee.com/d/2DRPosd2gQrhp7ee3D4THCXCQrEFLThKCqejqdQkTXEFECzAS zt5d-WdSrCQrEFCzBZBxwQsCN6Fe4GhTPMkxFqtokrm-cGNVsSxFqtokrm-cGNVsSe86zBPX FLZvATC7zhOyDRXBQkQT-ojohjd7b_bnhIyyHsQsEYG7DR8OJMddECSjtPtPo0c-l9Q-9DUY SCShU03wCHIcfBisEeRNJcKTjUQdJFBSWv6xsxlK5LE2zVkDjUCvzPqrp7w09JZNNMS2_id4 1Fr2qpFtd40NdJlrQ3h1m1EwQQg0a2MQ4zhEwtShXsvdTdDo5ApJT-v9f ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://cp.mcafee.com/d/5fHCMUg40USyOess7e9LndTdEThjvKztcQsCQrEFLThjhd79J 6WarZQrITdEThjd7bXb31EVdydis9kzLDwF3iQWMESJYplzOVJ3iQWMESJYplzOVIsgd7bDT jvW_9Lcf6zB5fHTbEFFLYMCMyCqen-mKzp55mVEVhVkffGhBrwqrjdICXCXCM0pYGjFYjfNV