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

Is Embedded Sign of COBOL valid in DB2?


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sundar28

New User


Joined: 30 Jul 2005
Posts: 11
Location: Mysore

PostPosted: Thu Dec 28, 2006 4:07 pm
Reply with quote

For a field declaration
10 CURRENT-BALANCE PIC S9(6).

the value -12858 is stored internally as 12852Q
where Q is treated as -8 to save space needed for the sign.

1. Will it be TRUE on testing for NUMERIC condition on all COBOL standards?

2. Can it be passed to a DB2 field?
then what is the equivalent DB2 field declaration?


icon_rolleyes.gif
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Thu Dec 28, 2006 4:10 pm
Reply with quote

Hi !

Better post your question in the right forum-section.

Regards, UmeySan
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Dec 28, 2006 4:21 pm
Reply with quote

sundar28 wrote:
For a field declaration
10 CURRENT-BALANCE PIC S9(6).
the value -12858 is stored internally as 12852Q
where Q is treated as -8 to save space needed for the sign.
Not so much to save space, but just because that's how it's done...
Quote:
1. Will it be TRUE on testing for NUMERIC condition on all COBOL standards?
Absolutly, yes...
Quote:
2. Can it be passed to a DB2 field?
then what is the equivalent DB2 field declaration?
Absolutly, yes...How does DB2 expect a valid numeric field to be declaired?
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top