Ron,

sorry for me not understanding the meaning of the actual SYSIN.

If you run this (assuming SORTIN LRECL is 2500):
 INREC FIELDS=(1,2500,SQZ=(SHIFT=LEFT,MID=C' '))
 SORT FIELDS=COPY
 OUTREC FINDREP=(INOUT=(C' |',C'|'))

The INREC squeezes the record dropping all spaces and inserting a single
space where before was 1 or more spaces (so 2 or more spaces becomes 1
space).
MID is the magic keyword.
This will build a rec like this:
0000000645|VHO CASILLERO DIABLO |PINOT NOIR 750ML |

The OUTREC FINDREP replace all " |" with "|" and then:
0000000645|VHO CASILLERO DIABLO|PINOT NOIR 750ML|

I think you INREC PARSE could have been a good solution too (it seems "|"
it's the fields separator).

Best regards.


Il giorno gio 8 ott 2020 alle ore 17:46 Ron Thomas <[email protected]> ha
scritto:

> Hello
>
> I have a sample file as below and we would need to remove the spaces
>
> 0000000645|VHO CASILLERO DIABLO     |PINOT NOIR 750ML          |
> 0000000645|VHO CASILLERO DIABLO     |PINOT NOIR 750ML          |
> 0000000645|VHO CASILLERO DIABLO     |PINOT NOIR 750ML          |
> 0000000645|VHO CASILLERO DIABLO     |PINOT NOIR 750ML          |
> 0000000645|VHO CASILLERO DIABLO     |PINOT NOIR 750ML          |
> 0000000645|VHO CASILLERO DIABLO     |PINOT NOIR 750ML          |
> 0000000645|VHO CASILLERO DIABLO     |PINOT NOIR 750ML          |
> 0000000645|VHO CASILLERO DIABLO     |PINOT NOIR 750ML          |
> 0000000645|VHO CASILLERO DIABLO     |PINOT NOIR 750ML          |
>
> i have coded as below
>
>
> SORT FIELDS=COPY
> INREC OVERLAY=(001:001,010,UFF,M10,LENGTH=10,
>                012:012,025,UFF,M10,LENGTH=25,
>                038:038,025,UFF,M10,LENGTH=25,
>                001:001,2500,SQZ=(SHIFT=LEFT))
>
> but the output i am getting is as below
>
>
>
> 645|0|750|CASILLERODELDIABLO|VHOCASILLERODIABLO|
> 645|0|750|CASILLERODELDIABLO|VHOCASILLERODIABLO|
> 645|0|750|CASILLERODELDIABLO|VHOCASILLERODIABLO|
> 645|0|750|CASILLERODELDIABLO|VHOCASILLERODIABLO|
> 645|0|750|CASILLERODELDIABLO|VHOCASILLERODIABLO|
> 645|0|750|CASILLERODELDIABLO|VHOCASILLERODIABLO|
> 645|0|750|CASILLERODELDIABLO|VHOCASILLERODIABLO|
> 645|0|750|CASILLERODELDIABLO|VHOCASILLERODIABLO|
> 645|0|750|CASILLERODELDIABLO|VHOCASILLERODIABLO|
>
> here we can see that the data "VHO CASILLERO DIABLO  " spaces also got
> removed . is there a way we can get data as follows
>
> 0000000645|VHO CASILLERO DIABLO|PINOT NOIR 750ML|
>
> Could some let me know how this can be done ?
>
> Thanks.
> Ron T
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to