10-01-2015 1:58 AM
It has come to our attention that the OPEN DATASET command will open a file without error (and therefore allow reading of the records in the file ..) even when the file is in the process of being Ftp'd to the input/source directory. This is resulting in partially read files. Does anyone know how we can "check" (we were hoping the OPEN DATASET command would return an error if the file was not fully written ..) if a file is in the process of being written so we don't start reading/processing the file ?
Thanks
David
10-01-2015 8:23 AM
Hi David
Depends on the process in place, but typically what we do is while the copy of the file is in progress. Set File Suffix as ".Copy", once the file transfer is complete change the File Name from "Copy" to ".Ready".
Not sure if you're able to implement similar functionality
Regards
Arden
10-08-2015 2:37 AM
Hi David
If your issue has been resolved, please mark the thread as answered.
Regards
Arden
10-01-2015 8:28 AM
Hi ,
Try with FM TXW_DATA_FILE_ENQUEUE to enqueue file and set Lock_MODE as 'S'. (It will stop read access) before writing the file to Al11.
Use FM TXW_DATA_FILE_DEQUEUE after the file is completely written.
Thanks
-Always Learner