Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sign clause in decima

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

New User


Joined: 20 Dec 2006
Posts: 55
Location: noida

PostPosted: Wed Jul 28, 2010 2:11 pm    Post subject: Sign clause in decima
Reply with quote

Hi,
I have a variable "A" with a picture clause as S9(11)V99 COMP. I need to write this into a file in the format +/- S9(11).99 (i.e. the sign should be leading and a decimal sign should also be there).

Can someone help me to do this. I have one limitation - I cannot change the picture clause of A.

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

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Wed Jul 28, 2010 3:00 pm    Post subject:
Reply with quote

well,

you can have sign leading with datatype display, but not comp.
you can have a decimal sign with datatype alphanumeric
(after moving the contents of variable 'A' to a field defined with an edit mask)
but, you can not have a datatype comp with a decimal point physically contained in the comp variable

there is not need to change the picture clause of variable 'A'.
just define a field in your output file definition that contains an edit mask as the picture clause, move variable 'A' to this new field.

since most edit mask definitions (yes, you need to go to the manual),
contain provisions for only a + or -,
you may need extra code to insert the 'missing' sign.
but don't worry about that now, you will understand what I mean when
you have read the manual.
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 Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm
No new posts Hardcoded negative sign value in output scdinesh SYNCSORT 8 Fri Sep 08, 2017 5:28 am
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us