Reformatting Input field in my JCL
Posted: Thu Mar 15, 2012 12:38 am
Hi,
Thanks for checking this.
I have a file in the below format which is ftped.
123456789
123456789
123456789
123456789
It is 9 digit numbers one below the other n number of times each time.
I want to create an input file in the below format,
('123456789',
'123456789',
'123456789',
'123456789' )
The number should be preceded by " ' " and followed by " ' " and ",". The last number should not be followed by " , ".
I tried to use the DFSORT reformatting options but I'm facing errors, I'm not able to do for the symbol " ' " but other symbols "$" worked.
OUTREC FIELDS = (C'$',1,9,C',',12:X)
The output came as
$123456789,
$123456789,
$123456789,
$123456789,
I wanted all the remaining space after "," to be blanks, so gave 12:X. But only the 12th position became blank. What needs to be given to make all remaining space as blank ?
Please help me resolve this issue to create the input file in the required format. Thanks in advance.
Thanks for checking this.
I have a file in the below format which is ftped.
123456789
123456789
123456789
123456789
It is 9 digit numbers one below the other n number of times each time.
I want to create an input file in the below format,
('123456789',
'123456789',
'123456789',
'123456789' )
The number should be preceded by " ' " and followed by " ' " and ",". The last number should not be followed by " , ".
I tried to use the DFSORT reformatting options but I'm facing errors, I'm not able to do for the symbol " ' " but other symbols "$" worked.
OUTREC FIELDS = (C'$',1,9,C',',12:X)
The output came as
$123456789,
$123456789,
$123456789,
$123456789,
I wanted all the remaining space after "," to be blanks, so gave 12:X. But only the 12th position became blank. What needs to be given to make all remaining space as blank ?
Please help me resolve this issue to create the input file in the required format. Thanks in advance.