PARSE PROBLEM



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

PARSE PROBLEM

Postby ottoelflaco » Thu Jun 11, 2015 2:45 pm

Hello!,

like always, sorry my english :(.

If I have some input data like this:
RATE STRUC ST DPE
PBE INSTNCDEDE
BILG  LM CAT CODE PRFDE
TEST ASEEEE AE
SSSSSSS A AAAA DDD
A B C D E R F C


I need the next:
For each record, I need to separate the information in function of the last blank previous at the column 11. For example, this would be my out:
RATE STRUC                   ST DPE
PBE                          INSTNCDEDE
BILG  LM                     CAT CODE PRFDE
TEST                         ASEEEE AE
SSSSSSS A                    AAAA DDD
A B C D E                    R F C


The separated information is colocated in column 30.

I m trying to use PARSE, but....not easy :? . could anybody help please?
ottoelflaco
 
Posts: 36
Joined: Fri Sep 21, 2012 2:33 pm
Has thanked: 1 time
Been thanked: 0 time

Re: PARSE PROBLEM

 

Re: PARSE PROBLEM

Postby enrico-sorichetti » Thu Jun 11, 2015 3:53 pm

pretty impossible using sort...

easy using a program

parse in space separated tokens,
check the length of each token
concatenate tokens for a total length less than 11 for the first part
the rest of the tokens for the second part
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post