I have two FB files of the exact same length. Lets say for the sake of simplicity FB 100. The requirement is to
(a) Match the key (1,5,CH) for the first bytes and get all the records in File 1 which is not present on File 2 into file 3
(b) If key (1,5,ch) matches, then compare the date fields (6,18) (ccyy-mm-ddhh.mm.ss) and if the difference is either positive or negative 3 hours, then ignore that record, write remaining records into file 3
(a) is definitely possible in sort and i have done this. However can we do (b) as well either way directly or convert the date into hours/second and then do comparison and suggestions will definitely help. I understand we can do this in cobol using and INTEGER-OF-DATE function. However matching is much simpler in sort.
quoting verbatim expat with the proper legalese about copyright, IP ownership, fair use assumption, the usual blah blah
Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.
If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.
If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.
If the messages start with WER or SYT then the product is SYNCSORT and should be posted in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.
Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in you site.
You also need to provide more detail than you already have.
What is the DSORG, RECFM & LRECL of the input file.
please refrain from posting the same question on multiple forums,
as said zillions times by expat find the sort product that You are using
and post only once. Thank You in advance for caring!
also when posting use a meaningful title, SYNCSORT does not convey any useful info about Your issue
Thank you for your suggestions.
We have SYNCSORT as the utility. However, the reason for the multiple posts, is because my colleage uses DFSORT. For this particular scenario, should the posting be done differently? Your suggestions are welcome.
I will ensure the subject line is more meaningful. Thank you for pointing that out.
Please let me know if you feel you need more information or I need to re-word differently.