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
 

 

what does '+' mean in following code?

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

New User


Joined: 01 May 2006
Posts: 9

PostPosted: Tue May 02, 2006 10:55 am    Post subject: what does '+' mean in following code?
Reply with quote

what does '+' mean in all the three places in the following code?

05 WC-ABEND-SQLSTAT PIC +++9.
.
.
.
.
03 WS-SQL-RETURN-CODE PIC S9(4).
88 WC-SQL-SUCCESS VALUE +0.
88 WC-SQL-NO-ROW VALUE +100.
88 WC-END-OF-FETCH VALUE +100.
88 WC-SQL-ACCEPTABLE-RETURN VALUE 0, +100.
.
.
.
.
03 WD-DISPLAY-SQLCODE PIC +++++++++9

[/b]
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Tue May 02, 2006 2:47 pm    Post subject: Re: what does '+' mean in following code?
Reply with quote

Dont know why put up multiple '+' signs when a single can do what is needed.

Regards,
Priyesh.
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Tue May 02, 2006 3:03 pm    Post subject: Re: what does '+' mean in following code?
Reply with quote

In the first and the last case the +++9 can store a value of 9(4) and if its having a value of 999 then its going to display +999.


Correct me if I am wrong.

Thanks
Shri
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Tue May 02, 2006 3:33 pm    Post subject: Re: what does '+' mean in following code?
Reply with quote

Quote:
In the first and the last case the +++9 can store a value of 9(4)

Did you check that... moving a value of 9999 in +++9 would truncate one bit from left in the destination string.

Regards,
Priyesh.
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Tue May 02, 2006 4:00 pm    Post subject:
Reply with quote

I never tried this.

You may be correct.

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

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed May 03, 2006 5:37 am    Post subject:
Reply with quote

Quote:
Dont know why put up multiple '+' signs when a single can do what is needed.

Not if you want a floating sign.

+++9 value 123 will give you +123 when displayed or printed; +++9 value 3 will give you +3.

+999 value 3 will give you +003.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Wed May 03, 2006 9:11 am    Post subject: Re: what does '+' mean in following code?
Reply with quote

Oh Jack... Thanks a lot... for clearing the doubt...

Regards,
Priyesh.
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Wed May 10, 2006 5:40 pm    Post subject:
Reply with quote

Hi niharika1234,

Multiple '+' sign in your code is edit mask character. This are most commonly used with the fields pertaining to reports etc.

You might have noticed that in the VALUE clauses of your code there are no multiple '+' signs.

Some of the other edit characters are :
! . , / B 0 $ * Z + - CR DB A X 9 S V P
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 How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


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