for debugging , i need to display variables in hexadecimal

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
danig
Member
Posts: 5
Joined: Thu Apr 10, 2008 2:36 pm

for debugging , i need to display variables in hexadecimal

Post by danig » Thu Apr 10, 2008 2:42 pm

thnx all

mkk157
Member
Posts: 37
Joined: Wed Feb 07, 2007 2:00 pm
Location: Hyderabad

Post by mkk157 » Fri Apr 11, 2008 4:40 pm

Hi DaniQ,

Welcome to the forums.

Use HEX ON command for that.
Kumar
If u can dream it, U can do it.

danig
Member
Posts: 5
Joined: Thu Apr 10, 2008 2:36 pm

thnx alot , but I need an example. compilation fails.

Post by danig » Sat Apr 12, 2008 9:34 pm

mkk157 wrote:Hi DaniQ,

Welcome to the forums.

Use HEX ON command for that.

User avatar
DavidatK
Active Member
Posts: 65
Joined: Tue Mar 27, 2007 8:41 am
Location: Troy, MI USA

Post by DavidatK » Mon Apr 14, 2008 4:49 am

danig,

I think I know what you want to do, but before I start explaining how, maybe you can clarify exactly what you need, possibly with an example.

Thanks,

Dave

danig
Member
Posts: 5
Joined: Thu Apr 10, 2008 2:36 pm

thanks alot , here is an example

Post by danig » Tue Apr 15, 2008 11:54 am

for example:

working storage section

02 L-ISN PIC 9(9).
02 aaa pic xxx.

procedure division

move 'abc' to aaa.
DISPLAY 'L-ISN = ' L-ISN
DISPLAY 'AAA = ' AAA.

result:

L-ISN = 002766557
AAA = ABC

what i would like to display: F0F0F2F7F6F6F5F5F7
C1C2C3

THANKS AGAIN

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Thu Apr 17, 2008 12:46 pm

you are viewing the 'displayed data' someplace.

in sdsf, view/edit your JES output that contains the 'DISPLAYED DATA', turn hex on.

yea, you could spend a day or so creating a routine to convert and display, but why? just use the hex view capabilites of the utility you use to view your 'sysout'.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

danig
Member
Posts: 5
Joined: Thu Apr 10, 2008 2:36 pm

Post by danig » Thu Apr 17, 2008 1:34 pm

hi dick
thnx.
have done that already.
just wanted to find out if there is a built in solution in cobol code.
seems there isnt.
tanks anyway.
dan.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others