Hi All,
I have a mainframe file which has 400+ columns are COMP-3 fields. Please let me know to convert all COMP-3 fields to readable format ( CSV or excel ). Appreciate your response.
Thanks,
Naga.
Comp-3 fields Conversion
- sergeyken
- Posts: 458
- 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: Comp-3 fields Conversion
naga821 wrote:Hi All,
I have a mainframe file which has 400+ columns are COMP-3 fields. Please let me know to convert all COMP-3 fields to readable format ( CSV or excel ). Appreciate your response.
Thanks,
Naga.
It depends on: which tool you are planning to use for this conversion (out of 100500 of available tools)??
BTW, there are no "files" on mainframe. There are "datasets"
P.S. It is almost unrealistic to convert your data to the actual "EXCEL format"; you might need to re-invent significant part of the internal code of MS Excel program itself. It makes no sense. But CSV is possible, in many different ways. All depends on: what you are familiar with?

P.P.S.
The data on mainframe are all in EBCDIC codepage, but where Excel is used, all data are (usually) in ASCII code page. Did you hear about those terms?
Javas and Pythons come and go, but JCL and SORT stay forever.
- prino
- Posts: 641
- Joined: Wed Mar 11, 2009 12:22 am
- Skillset: PL/I - CICS - DB2 - IDMS - REXX - JCL, most in excess of three decades
- Referer: Google
- Location: Vilnius, Lithuania
- Contact:
Re: Comp-3 fields Conversion
On the small white box side you could probably do this with two or so dozen lines of REXX (Regina, ooREXX), by parse each record into stem variables, and loop through the stems using the various X2Y conversion routines.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
robert.ah.prins @ the.17+Gb.Google thingy
- sergeyken
- Posts: 458
- 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: Comp-3 fields Conversion
As for myself, I’d prefer using SORT utility in this situation
Code: Select all
//PD2CSV EXEC PGM=SORT
. . . . . . . . .
//SYMNAMES DD *
F001,PD,*,5
F002,PD,*,10
F003,PD,*,15
. . . . . . . . .
F400,PD,*,10
//*
//SORTIN DD . . . . . . .
//SORTOUT DD . . . . . . .
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(F001,Mx, choose Mx for most acceptable format
C’,’,F002,Mx,
C’,’,F003,Mx,
. . . . . . .,
C’,’,F400,Mx)
//*
Javas and Pythons come and go, but JCL and SORT stay forever.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 5
- 2634
-
by sergeyken
View the latest post
Thu Feb 25, 2021 8:19 pm
-
- 3
- 1453
-
by sergeyken
View the latest post
Sun Nov 29, 2020 6:47 am
-
-
.TXT file conversion to .CSV/.XLSX
by dangtran10 » Thu May 20, 2021 7:09 am » in DFSORT/ICETOOL/ICEGENER - 3
- 1907
-
by steve-myers
View the latest post
Fri May 21, 2021 10:57 pm
-
-
- 7
- 1980
-
by sergeyken
View the latest post
Wed Dec 23, 2020 6:39 pm
-
-
Code conversion issue while reading JCL using REXX
by vsgurunath » Fri Jun 19, 2020 10:19 pm » in CLIST & REXX - 11
- 4246
-
by vsgurunath
View the latest post
Thu Jun 25, 2020 4:08 pm
-