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 Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 7 Mon Mar 27, 2017 3:59 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm


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