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
Parsing more than 1000 columns in a sort card Reply with quo
-
ssuthagar
- Posts: 1
- Joined: Tue Sep 22, 2020 3:00 am
- Skillset: IMS DB/DC
- Referer: I am a member at expert forum
- sergeyken
- Posts: 473
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: Parsing more than 1000 columns in a sort card Reply with
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.
-
- Similar Topics
- Replies
- Views
- Last post
-
-
sort card to add zeros to varying alphanumeric field.
by longfall » Thu Mar 09, 2023 12:03 am » in DFSORT/ICETOOL/ICEGENER - 1
- 2948
-
by sergeyken
View the latest post
Thu Mar 09, 2023 2:04 am
-
-
- 5
- 4791
-
by kanipriya2785
View the latest post
Tue Jun 21, 2022 9:32 pm
-
- 5
- 2963
-
by willy jensen
View the latest post
Fri Dec 03, 2021 8:16 pm
-
-
COBOL SORT - How to sort entire file first & sort by Key
by k_ekam » Thu Dec 01, 2022 12:58 pm » in IBM Cobol - 3
- 3882
-
by Robert Sample
View the latest post
Wed Dec 07, 2022 7:32 am
-
-
- 3
- 2858
-
by jcdm
View the latest post
Thu Aug 18, 2022 1:25 pm