IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How the COMP data can be viewed in a file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1436
Location: Bangalore,India

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

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

Senior Member


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

PostPosted: Mon Oct 08, 2007 3:51 pm
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: 1287
Location: Chennai, India

PostPosted: Mon Oct 08, 2007 4:11 pm
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
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
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: 6966
Location: porcelain throne

PostPosted: Mon Oct 08, 2007 6:21 pm
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
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: 2146
Location: At my coffee table

PostPosted: Mon Oct 08, 2007 6:41 pm
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: 275
Location: Bang,iflex

PostPosted: Tue Oct 09, 2007 3:58 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top