Parsing more than 1000 columns in a sort card Reply with quo



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Parsing more than 1000 columns in a sort card Reply with quo

Postby ssuthagar » Tue Sep 22, 2020 3:02 am

Hi Seniors,

My requirement is to parse CSV file with 1020 columns and I know that I can parse only 1000 columns in a sort card.

It is a VB file since the data may not be available for all columns but the delimiters are available.

I would really appreciate if someone can help me to resolve this situation.

Note: - I am trying to split a file based on delimiter with 1000 columns.

Thanks,
Suthagar
ssuthagar
 
Posts: 1
Joined: Tue Sep 22, 2020 3:00 am
Has thanked: 0 time
Been thanked: 0 time

Re: Parsing more than 1000 columns in a sort card Reply with

Postby sergeyken » Tue Sep 22, 2020 9:06 pm

ssuthagar wrote:Hi Seniors,

My requirement is to parse CSV file with 1020 columns and I know that I can parse only 1000 columns in a sort card.

It is a VB file since the data may not be available for all columns but the delimiters are available.

I would really appreciate if someone can help me to resolve this situation.

Note: - I am trying to split a file based on delimiter with 1000 columns.

Thanks,
Suthagar

You need to perform two (or more) passes of SORT operation - either as sequential JCL steps, or via SYNCTOOL:

1) use PARSE for the first maximum group of fields (with FIXLEN), while parsing all the rest fields as last PARSE parameter; use BUILD to create intermediate output record with aligned first group of fields (fixed size), and the last group of unparsed fields as single long “field” at the end of this intermediate record

2) scan that intermediate record: just copy the first group of already aligned fields, and PARSE the rest of input starting from fixed position; then - BUILD all fields with fixed size as final output record.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post