Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How the COMP data can be viewed in a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Oct 08, 2007 3:42 pm    Post subject: How the COMP data can be viewed in a file
Reply with quote

Hi,

Can anyone explain the procedure, how the COMP data can be viewed in a file.
Ex : for Comp-3 we will go for HEX ON and we can view the data in the file.
How the COMP data can be viewed in a file ?
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Oct 08, 2007 3:48 pm    Post subject:
Reply with quote

Use fileaid.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Oct 08, 2007 3:51 pm    Post subject:
Reply with quote

HEX ON will allow you to view it but you will still be seeing the binary value....
Use Window's calculator to convert it from HEX to DECIMAL....
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Mon Oct 08, 2007 4:11 pm    Post subject: Reply to: View COMP data
Reply with quote

Quote:
Ex : for Comp-3 we will go for HEX ON and we can view the data in the file.


You can display the packed decimal fields using SORT/OUTREC/Edit masks.

Code:
OUTREC FIELDS=(1,8,PD,M4)


The above code is just an example.
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Oct 08, 2007 4:15 pm    Post subject: Reply to: View COMP data
Reply with quote

Its Good working.. Thanks a lot CICS Guy
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Mon Oct 08, 2007 5:41 pm    Post subject:
Reply with quote

CICS Guy: I got tripped up by this a few weeks back, I had a comp field with a value of FFFFFFFFFFFFFECA. The field was PIC S(9). What is the decimal value?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Mon Oct 08, 2007 6:21 pm    Post subject:
Reply with quote

-310

zero your calculator.

hex mode

enter ffff
minus feca
+ 1
equals

dec mode
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Mon Oct 08, 2007 6:25 pm    Post subject:
Reply with quote

That's what I ended up doing, I hadn't had to use the 2's complement since school. It threw me for a second because I took the straight hex value and did the windows calc thing and I got a huge number, but I knew it was a DB2 error. I used the windows calculator -> binary flipped the bits +1.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Oct 08, 2007 6:41 pm    Post subject:
Reply with quote

stodolas wrote:
CICS Guy: I got tripped up by this a few weeks back, I had a comp field with a value of FFFFFFFFFFFFFECA. The field was PIC S(9). What is the decimal value?
Since the highest bit (for the calculator) is on, just a simple +/- key produces the hex 136 (decimal 310).....
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 276
Location: Bang,iflex

PostPosted: Tue Oct 09, 2007 3:58 pm    Post subject: Hi.....
Reply with quote

Hi All,


You can check FIle Aid, instead of complex calculations.....






Regard's
Vasanth. icon_smile.gif
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Oct 09, 2007 5:25 pm    Post subject:
Reply with quote

Addition and subtraction are not complex and File-Aid isn't available in every shop. It's better to know how to do it for cases where the data isn't stored in a file, like when you are tracing a program and watching memory to see a value.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us