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
 

 

help on comp-3 variable having non-numeric

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sribks2005

New User


Joined: 04 Apr 2005
Posts: 20
Location: Mysore

PostPosted: Fri Apr 22, 2005 12:37 pm    Post subject: help on comp-3 variable having non-numeric
Reply with quote

hi,

Variable Declaration.
===============
01 ABC pic S9(9) comp-3.

Value
====
This variable is having value 123455633F.

But Comp-3 value can have either "C" or "D" as its last character to consider it has numeric.

Can anybody tell me why Comp-3 value gets 123455633F type of value?? icon_question.gif

This variable is satisfying non-numeric test.

waiting for your replies

Thanks
Back to top
View user's profile Send private message

sribks2005

New User


Joined: 04 Apr 2005
Posts: 20
Location: Mysore

PostPosted: Fri Apr 22, 2005 12:41 pm    Post subject: Sorry for giving wrong value
Reply with quote

hi all,

Please ignore the value i have given for that variable.

Correct value which it has got is 123455633F.

I was trying to make "F" bold, and it has come like that.

sorry for inconvenience

i want to know why it has got "F" in its last position instead of "C" or "D".

thank you
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1202
Location: India

PostPosted: Fri Apr 22, 2005 9:22 pm    Post subject:
Reply with quote

Quote:
was trying to make "F" bold, and it has come like that.


That's because, you have disabled BBCODE while posting the query.

Quote:
want to know why it has got "F" in its last position instead of "C" or "D".


This is because your data is UNSIGNED Positive at COMP-3 storage format. So system will insert 1111.
Back to top
View user's profile Send private message
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

PostPosted: Fri Apr 22, 2005 9:50 pm    Post subject:
Reply with quote

Hi sribks2005
The possible values for a sign fileds are A,B,C,D,E and F.

B and D - Negative

A,C,E and F - Positive.

hth
-Som
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1202
Location: India

PostPosted: Sat Apr 23, 2005 8:07 am    Post subject:
Reply with quote

Quote:
The possible values for a sign fileds are A,B,C,D,E and F.

For Packed Decimal (COMP-3) ????
Back to top
View user's profile Send private message
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

PostPosted: Sat Apr 23, 2005 9:16 pm    Post subject:
Reply with quote

Yes Mcmillan.
I have mentioned that the possible values for the sign field.
As you know Comp-3 fields are in BCD format. For more information check the Principles of Operation manual here

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DZ9AR007/A.1.2?DT=20010725142528

Regds
-Som
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Apr 24, 2005 3:23 am    Post subject: Re: help on comp-3 variable having non-numeric
Reply with quote

You're right SOM. These sign codes have been around for many a year and are recognized for compatibility reasons. But are not generated by today's compilers/assemblers.
Back to top
View user's profile Send private message
sribks2005

New User


Joined: 04 Apr 2005
Posts: 20
Location: Mysore

PostPosted: Mon Apr 25, 2005 9:53 am    Post subject: thanks
Reply with quote

hi all,

thank you very much for your inputs.

One more question,
why comp-3 value having F as its last char is failing numeric test??


waiting for your replies...
thank you
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Apr 26, 2005 4:56 am    Post subject:
Reply with quote

Show us the field def and the instuction. Also the error msg.

Preferably use cut and paste to be sure the info is accurate and represents what you are seeing.

Thanx
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


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