I suggest to avoid posting back and forth the intermediate updates so give a try end to end with solution provided and if you are stuck anywhere then only post the that part what’s not working that way there is no or less confusion.
Joined: 15 Aug 2015 Posts: 1307 Location: Bamberg, Germany
Basically the whole thing is inconsequent. What if VIRTDATE matches only HEADER or TRAILER, and not both? Is this still a valid match or a diff? Should VIRTDATE assumed to be HEADER and TRAILER value and so on.
I want to check whether date in file 2 is correct or not it is not matching it should create an empty file if matching it should create a file having matching data.
please note in file2 record one has the date position is from 7th to 12th position and in record2 the date field position is form 8th to 13th. The whole idea is to just check whether the header and trailer date are correct if not correct need to send mail to a team.
Now both file date has same format, and they are in same position 1 to 10th inclusive. I need bit help here to validate the date in file 2 in both recorded whether in both record the date is matching with file 1 date if not correct create a empty file so that basis on this i can take further decision job es explained above i need to send mail to team saying that date is not matching. I feel i am close if anyone could give hint here.
SORTEX05 0006919 S U0016 THU 26 OCT 2023.299 02:05
my both file length is 2003, first it was getting abended due to Parm error.
You need to use PARM='RC16=NORC16'
You also must present here the exact code, and the exact results you've got.
Where is your sample of code?
Where is your log of execution?
Where are your input and any output data?
Do not forget to use the Code button when posting your code samples.
Otherwise there is nothing to talk about.
Try to understand this.
Please, try not only to copy-and-paste, but also to apply some thinking abilities.
Do not suppose that others would do your own job, free of charge.
Unlike SYNCSORT, the IBM's DFSORT does not take PARM='RC16=NORC16'
Instead, you can use the specific statement DEBUG NOABEND DEBUG control statement
Again: this is your own responsibility to find out such technical details.
I continue doing your own job, while you are only sending your requirements, in a hard-to-understand manner.
You resemble me a "big boss", who has no idea about any technical details, but only gives instructions like: "The grass must be painted green, starting from the fence, and ending by lunch"
IF the date is not matching my unmatched file has data and accordingly i am checking further in process. I am not bothered about matched file if unmatched file has data it means date is not matching.
Unlike SYNCSORT, the IBM's DFSORT does not take PARM='RC16=NORC16'
Instead, you can use the specific statement DEBUG NOABEND DEBUG control statement
Again: this is your own responsibility to find out such technical details.
I continue doing your own job, while you are only sending your requirements, in a hard-to-understand manner.
You resemble me a "big boss", who has no idea about any technical details, but only gives instructions like: "The grass must be painted green, starting from the fence, and ending by lunch"
I have solved my all questions asked here by myself i guess, if you check the post completely, I extracted whole data from file and prepared a complete job myself and able to achieve this. few suggestions it helped me but i wrote my all code by myself.
I thank you for you all for having a look at my problem.
Thank you for your support and suggestions here.
1st I extracted the date in one file which I need to compare the with file2.
2nd since the the format of the date in both file was different i reformatted the date in file1, now the date format is same in Both the the file.
3rd now i have
File1: having one record which is date
record01 2024-04-23
File2: having 2 record
record01 HEADER2024-04-23
record02 TRAILER2024-04-23
4TH i removed the header and trailer string from both the record and compare the date from file1 to date in file2 if it is not matching with any of the record in file2 it creates in unmatched file by checking the data in unmatched data set i proceed further in my job.