Page 1 of 1

COBOL program to display a hex dump

PostPosted: Fri Jul 16, 2021 1:34 am
by tsdjim
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

Re: COBOL program to display a hex dump

PostPosted: Fri Jul 16, 2021 5:37 pm
by sergeyken
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?

Re: COBOL program to display a hex dump

PostPosted: Fri Jul 16, 2021 6:44 pm
by tsdjim
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

Re: COBOL program to display a hex dump

PostPosted: Fri Jul 16, 2021 6:57 pm
by sergeyken
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?).

Re: COBOL program to display a hex dump

PostPosted: Fri Jul 16, 2021 11:49 pm
by prino
tsdjim wrote:I am tasked with replacing this routine by a COBOL program.

Care to explain why some PHB found this necessary?

Re: COBOL program to display a hex dump

PostPosted: Sat Jul 17, 2021 12:38 am
by sergeyken
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:

Re: COBOL program to display a hex dump

PostPosted: Sat Jul 17, 2021 12:38 am
by sergeyken
Del…