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
 

 

Facing problems if I declare a variable as S9(13).9(1)

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

New User


Joined: 28 Sep 2005
Posts: 7

PostPosted: Wed Dec 06, 2006 12:10 am    Post subject: Facing problems if I declare a variable as S9(13).9(1)
Reply with quote

Is it not possible to declare a numeric variable as S9(13).9(1) in Cobol? I get compilation error if I try this.

Please help me out icon_sad.gif

Regards,
Lakshmi
Back to top
View user's profile Send private message

William Thompson

Global Moderator


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

PostPosted: Wed Dec 06, 2006 12:41 am    Post subject:
Reply with quote

Do yoy mean S9(13)V9(1) or -9(13).9(1)?
Back to top
View user's profile Send private message
lakshmi_p01

New User


Joined: 28 Sep 2005
Posts: 7

PostPosted: Wed Dec 06, 2006 12:48 am    Post subject: Re: Facing problems if I declare a variable as S9(13).9(1)
Reply with quote

I tried declaring it as S9(13).9(1)..
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Wed Dec 06, 2006 2:14 am    Post subject:
Reply with quote

Do you mean S9(13)V9(1) or -9(13).9(1)?

The first is to define an item for computational purposes, a signed 14 digit number with one digit behind the implied decimal point.

The second is to define an item for display purposes, a 14 digit number with the minus sign (if negative) leading and the lowest digit behind a decimal point.

Using the "S" in the same definition with the "." is (apparently) illegal. icon_sad.gif
Back to top
View user's profile Send private message
lakshmi_p01

New User


Joined: 28 Sep 2005
Posts: 7

PostPosted: Wed Dec 06, 2006 3:03 am    Post subject: Re: Facing problems if I declare a variable as S9(13).9(1)
Reply with quote

I tried with -9(13).9 and it works.. Thanks much William icon_smile.gif
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm


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