Hi All,
I am accepting a copybook as input from user and need to write a output file with test data as per the input copybook layout.
I am taking the PIC clause and checking if it is 'X' or 9 and taking the length which is present in between the braces.
for example if the value is PIC X(25), im taking 25 into a variable and picking that many bytes of random data from the reference file and writing it to an output file.
I am able to write a output file, but the data is overwritten and the output contains the last fields value.
Can anyone please help me on this how to proceed.?
I want to read a first record from my input and write output for those many bytes.
and read next record from input file and write a output in the same first line with few bytes starting from the next byte of first field.
Thanks in advance.
Me eru.
I am accepting a copybook as input from user and need to write a output file with test data as per the input copybook layout.
I am taking the PIC clause and checking if it is 'X' or 9 and taking the length which is present in between the braces.
for example if the value is PIC X(25), im taking 25 into a variable and picking that many bytes of random data from the reference file and writing it to an output file.
I am able to write a output file, but the data is overwritten and the output contains the last fields value.
Can anyone please help me on this how to proceed.?
I want to read a first record from my input and write output for those many bytes.
and read next record from input file and write a output in the same first line with few bytes starting from the next byte of first field.
Thanks in advance.
Me eru.