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

Need to Add two sign trailing seperate variables


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

New User


Joined: 09 Apr 2008
Posts: 41
Location: USA

PostPosted: Mon Nov 03, 2008 11:52 am
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

Moderator Emeritus


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

PostPosted: Mon Nov 03, 2008 12:04 pm
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: USA

PostPosted: Mon Nov 03, 2008 12:34 pm
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
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: USA

PostPosted: Mon Nov 03, 2008 2:13 pm
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
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

Moderator Emeritus


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

PostPosted: Mon Nov 03, 2008 2:56 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts JCL with variables JCL & VSAM 1
No new posts JCL Variables JCL & VSAM 1
No new posts reset/clear ALL application profile v... TSO/ISPF 3
No new posts REXX - Adding variables CLIST & REXX 8
No new posts using based or defined variables PL/I & Assembler 2
Search our Forums:

Back to Top