My job is used to convert (By COBOL program) the Common delimited variable block file in to Fixed format fixed block file. And this job is a dataset triggered job that is when ever third party send us the file this job will be triggered. Now there is only one third party so no problem ,but there is new third coming in to picture, so they will be sending the file in different file name.
Now instead of using different Jcl I am planning to use one JCL and include member in it which has the DD statement for the input file. Based on the output of the List cat (Gives which third party file cataloged)I will be creating this Include member. Now by giving the listcat output to the sort card I have tried to create multiple members (Since I need to change the file names in different steps) using outfil statement, but all the members are written with the output of the last outrec statement instead of corresponding outrec statement. Below I have attached the screen shot of my JCL