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

Is it must to convert the variable as S9(5) to store Sign


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

New User


Joined: 31 Oct 2006
Posts: 4

PostPosted: Thu Nov 02, 2006 12:29 pm
Reply with quote

There is a variable in the format 9(4)V9(2) which has the first byte as the SIGN. It is to be converted to the format S9(5)V(2).

WARNING: TITLE EDITED
Back to top
View user's profile Send private message
ramesh_m

New User


Joined: 27 Sep 2006
Posts: 10
Location: Sydney

PostPosted: Thu Nov 02, 2006 2:03 pm
Reply with quote

Hi,
We can't have negative sign in the first byte of data format 9(4)V9(2).
only positive values we can store in this format. So here no point to transfer sign to other varriable
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Nov 04, 2006 5:08 am
Reply with quote

Hi Viv,

The best way to get an ans, is to show us how the field looks in storage. Then we may be able to advise you as to how it should be defined.

For example show us each char as 2 4-bit peices (nybbles) of each byte. +153 will appear as follows in storage (I'm not sure about the + sign value, but you get the idea):
Code:

4FFF
E153
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 Store the data for fixed length COBOL Programming 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Variable Output file name DFSORT/ICETOOL 8
Search our Forums:

Back to Top