Could you please help me in getting the desired output through ICETOOL.
Explanation:
The input has 3 records and for every input record it writes many instances in the output file based on the AMT field which is 70. So in the Do while the loop is performed until AMT field in <= 70. So for the first input record the SAL field is initially 50 and the has to be performed until <= 70(i.e AMT field), so the output has 50, 60 and 65 as it is incremented in the Do while loop by 5 before writing in the output file. Similarly is the case with EMP No is 200 and 300.
for e.g.
DO WHILE (SAL <= AMT)
SAL = SAL + 5;
<WRITE OUTPUT>
END;
The length of each field can be assumed as 10 bytes each. Input files can have RECFM=FB and LRECL=80.
Please refer to the below output structure for more clarity.
Thanks in advance
Code:
Input:
Emp no Name Place Sal
100 Dexter Dor 50
200 Hillary Aus 60
300 Bush USA 65
Output:
Emp no Name Place Sal
100 Dexter DOR 50
100 Dexter DOR 55
100 Dexter DOR 60
100 Dexter DOR 65
100 Dexter DOR 70
200 Hillary Aus 60
200 Hillary Aus 60
200 Hillary Aus 60
300 Bush USA 65
300 Bush USA 70
yes there was a mistake in the output shown. find the correct version now
Code:
Output:
Emp no Name Place Sal
100 Dexter DOR 50
100 Dexter DOR 55
100 Dexter DOR 60
100 Dexter DOR 65
100 Dexter DOR 70
200 Hillary Aus 60
200 Hillary Aus 65
200 Hillary Aus 70
300 Bush USA 65
300 Bush USA 70
you can assume AMT as just the hard coded field in the program.
AMT can be equal to SAL.
i did tried using ICETOOL but i cant find any solution so thought of approaching the forum.
this is one of requirement in the project where i want to convert from PL1 to ICETOOL.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
vaibhavjadhav wrote:
[...]this is one of requirement in the project where i want to convert from PL1 to ICETOOL.
Is it a fairly small PL/I program? Otherwise, it sound like a strange idea. Let us know how the conversion goes, I'm always imrpessed by DFSORT/ICETOOL, and it would knock my socks off if you can do it with a non-simple program :-)