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
 

 

Need to Add two sign trailing seperate variables

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

New User


Joined: 09 Apr 2008
Posts: 41
Location: chennai

PostPosted: Mon Nov 03, 2008 11:52 am    Post subject: Need to Add two sign trailing seperate variables
Reply with quote

Hi,

I need to add two Sign Trailing variables, for Ex,

I/p

Amount1 S9(04)V99 SIGN TRAILING SEPERATE
value 100000+
Amount2 S9(04)V99 SIGN TRAILING SEPERATE
value 280000+

Need an ouput like this

O/P

Total 380000+
Back to top
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Mon Nov 03, 2008 12:04 pm    Post subject:
Reply with quote

Hello,

I'm not sure there is a question here. . .

COMPUTE MY-TOTAL = Amount1 + Amount2 will sum the numbers.
Back to top
View user's profile Send private message
balukanna

New User


Joined: 09 Apr 2008
Posts: 41
Location: chennai

PostPosted: Mon Nov 03, 2008 12:34 pm    Post subject:
Reply with quote

Hi Dick,

i have tried it but it is giving an error

"An invalid separate sign was detected in program"
Back to top
View user's profile Send private message
Cristopher

New User


Joined: 31 Jul 2008
Posts: 53
Location: NY

PostPosted: Mon Nov 03, 2008 1:52 pm    Post subject:
Reply with quote

Hi Balukanna,
What is the error code appearing? By any chance have you used a Redefine clause involving the sign position or you may not have initialized it.Can you share the details of the actual variables used in the computation.
Cris
Back to top
View user's profile Send private message
balukanna

New User


Joined: 09 Apr 2008
Posts: 41
Location: chennai

PostPosted: Mon Nov 03, 2008 2:13 pm    Post subject:
Reply with quote

Hi Cris,
I have initialized the fields, i haven't used any redefine clause,


Code:
COMPUTE SETUP-AMT =         
        RTV-EXT +  CR-EXT
END-COMPUTE 


while running the job em getting MAXCC 12
The Sysout msg is
"IGZ0040S An invalid separate sign was detected in program "
Back to top
View user's profile Send private message
Cristopher

New User


Joined: 31 Jul 2008
Posts: 53
Location: NY

PostPosted: Mon Nov 03, 2008 2:35 pm    Post subject: Reply to: Need to Add two sign trailing seperate variables
Reply with quote

Balukanna,
Please provide the PIC clause definition of the variables RTV-EXT,CR-EXT and SETUP-AMT .
Hope you would not have used a group move involving the sign position.
Cris
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Mon Nov 03, 2008 2:56 pm    Post subject:
Reply with quote

Hello,

Sorry - missed the separate sign icon_redface.gif

Where did input in this non-standard for come from (data with an external sign, but no punctuation)? Usually the decimal would be imbedded in the data, not implied. We process many uploaded pc and unix files that are punctuated with a decimal point and a sign and use the function NUMVAL-C to easily use the data.
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 Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm
No new posts TWS 'global' or 'local' variables Steve Coalbran IBM Tools 2 Thu Mar 17, 2016 7:40 pm
No new posts Add Trailing Zeroes depending upon th... Rohit Umarjikar DFSORT/ICETOOL 3 Fri Oct 23, 2015 1:47 am
No new posts Removing Leading Spaces and Removing ... rahulpala COBOL Programming 4 Fri Sep 04, 2015 4:58 am


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