A JCL or a SORTCARD that can split the input file into multiple output files based on size of the input file

203 Views Asked by At

I have a large input file that i would want to split it into more than output file if the size input file is greater than 10 MB and i want the header record from the input to be copied to all the output files that are catalogued

Example : a) If i receive a file of 42 MB it should create 4 output datasets b) If i receive a file of 9 MB it should create only one output dataset

I was hoping that it could be done through a sort card or if there is an approach that i can take in this case or if someone had faced a similar scenario and handled them.

Where do i start

  1. Tried creating an rexx program that can do this, but my knowledge of rexx is zero . tried using ChatGPT but that didn't get me anywhere

  2. Browsed all the forums for a similar scenario but couldn't get any that fits this requirement.

0

There are 0 best solutions below