Comp-3 fields Conversion



Post anything related to mainframes (IBM & UNISYS) if not fit in any of the above categories

Comp-3 fields Conversion

Postby naga821 » Wed Dec 07, 2022 11:45 am

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.
naga821
 
Posts: 4
Joined: Fri Oct 28, 2022 10:04 am
Has thanked: 0 time
Been thanked: 0 time

Re: Comp-3 fields Conversion

Postby sergeyken » Wed Dec 07, 2022 9:30 pm

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.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: Comp-3 fields Conversion

Postby prino » Fri Dec 09, 2022 4:18 pm

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
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: Comp-3 fields Conversion

Postby sergeyken » Sat Dec 10, 2022 2:30 am

As for myself, I’d prefer using SORT utility in this situation


//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.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times


Return to All other Mainframe Topics

 


  • Related topics
    Replies
    Views
    Last post