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

Displaying a PIC s9(7) field


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kodeesm

New User


Joined: 21 Jun 2006
Posts: 5
Location: Pune

PostPosted: Thu Jan 08, 2009 9:38 pm
Reply with quote

Hi,
When I am trying to display a PIC s9(7) field, in the SYSOUT it is coming up with 000000{. This field is getting update into the database, In the database it is showing as 972.

Kodeeswaran.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Jan 08, 2009 9:55 pm
Reply with quote

A decimal value of +0 would display as 000000{ as you've shown. X'F0F0F0F0F0F0C0'. I have no idea where the 972 is coming from. Are you looking at the correct row? column?.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 08, 2009 10:43 pm
Reply with quote

Hello,

Quote:
When I am trying to display a PIC s9(7) field, in the SYSOUT it is coming up with 000000{.
Have you ensured that a value was actually moved to the field before the DISPLAY was issued?
Back to top
View user's profile Send private message
kodeesm

New User


Joined: 21 Jun 2006
Posts: 5
Location: Pune

PostPosted: Thu Jan 08, 2009 11:50 pm
Reply with quote

Thanks for your valuable info. We are mapping the variables right now to ensure we are on the correct side.
Back to top
View user's profile Send private message
nitesh.mulay

New User


Joined: 30 May 2006
Posts: 10
Location: Pune

PostPosted: Fri Jan 09, 2009 10:14 am
Reply with quote

you can try with using s9(7) sign leading separate clause
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jan 09, 2009 10:19 am
Reply with quote

Hello,

How will that help with a value of zero in the display output when the database shows 972?
Back to top
View user's profile Send private message
shak_pm

New User


Joined: 09 Jan 2009
Posts: 1
Location: chennai

PostPosted: Fri Jan 09, 2009 1:58 pm
Reply with quote

Hi ,

I think the value here is 000000{ . the symbol '{ ' is representing a +ve zero for a signed field.But it is displayed as 972 ,so the possibility may the field is getting mapped somewhere before going to databse or please check if the correct row or column value is being checked.

to get the exact value in sysout we can move the field s9(7) value to a editing picture clause and then display.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts IBM OnDemand Folders displaying to al... IBM Tools 6
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
Search our Forums:

Back to Top