COBOL program to display a hex dump



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

COBOL program to display a hex dump

Postby tsdjim » Fri Jul 16, 2021 1:34 am

Hi

I am converting an Assembler program to Cobol.
The program dumps areas of storage in Dump format.
I can't find a way to do this easily in COBOL. Is there any
COBOL or LE module I can call to do this.

Thanks
Ron
tsdjim
 
Posts: 18
Joined: Mon Nov 03, 2008 1:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: COBOL program to display a hex dump

Postby sergeyken » Fri Jul 16, 2021 5:37 pm

Please, clarify, what this sentence stands for:
The program dumps areas of storage in Dump format.

:?: :?: :?:
After the process is re-designed in COBOL, there are no such areas from Assembler required “to dump them in Dump format”. Or this is your plan - to write an Assembler simulator using COBOL???

Additional questions:
1) what do you know about Assembler?
2) what do you know about COBOL?
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 437
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: COBOL program to display a hex dump

Postby tsdjim » Fri Jul 16, 2021 6:44 pm

The assembler program was just a subroutine, called by COBOL programs, passing 2 parameters, start-area-address and end- area-address. The addresses
are from the calling pgm working- storage. The assembler program produces a hex dump of the area, just like
standard IBM dumps.
I am tasked with replacing this routine by a COBOL program.

To answer your questions
1. I am an Assembler programmer for many years
2. I am a COBOL programmer for many years

Ron
tsdjim
 
Posts: 18
Joined: Mon Nov 03, 2008 1:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: COBOL program to display a hex dump

Postby sergeyken » Fri Jul 16, 2021 6:57 pm

This explanation makes a huge difference compared to the original question.

I guess there is no a ready-to-use tool to print from COBOL code the storage areas in dump format.

I believe it can be done, using address-manipulation tricks in COBOL, and hex-conversion to print storage.

I’m pretty sure the final result of this task doesn’t worth the expected amount of efforts to reach this goal. I, personally, would not even start doing so. At least - not trying to follow the Assembler’s Dump format (or SNAP format?).
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 437
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: COBOL program to display a hex dump

Postby prino » Fri Jul 16, 2021 11:49 pm

tsdjim wrote:I am tasked with replacing this routine by a COBOL program.

Care to explain why some PHB found this necessary?
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: COBOL program to display a hex dump

Postby sergeyken » Sat Jul 17, 2021 12:38 am

prino wrote:
tsdjim wrote:I am tasked with replacing this routine by a COBOL program.

Care to explain why some PHB found this necessary?

If only I gave the true and honest answer to this question, I’m afraid my usedID would be banned forever… :oops:
Last edited by sergeyken on Sat Jul 17, 2021 12:39 am, edited 1 time in total.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 437
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: COBOL program to display a hex dump

Postby sergeyken » Sat Jul 17, 2021 12:38 am

Del…
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 437
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post