I have the below requirement.
I need to compare two file and prepare an output file for the matched records.
In case of unmatched records from F1 and F2 I need a write a log file mentioning the unmatched key and corresponding error message in it.
Also after the final completion of the program I need to write the below statistics in log file.
Writing the log file should be done in sub program.
I have the below question. Is file operations possible in sub program. If possible then how can we achieve this.
Should physical declaration of file is needed in sub program. Can we open and close the file in main program or should it be done in sub program.
Show me some sample program.
I will be passing the below details for file write in main program to sub program.
Job Details
Key
details
Program name