Page 1 of 1

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

PostPosted: Tue Sep 22, 2020 3:02 am
by ssuthagar
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

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

PostPosted: Tue Sep 22, 2020 9:06 pm
by sergeyken
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.