View previous topic :: View next topic
|
Author |
Message |
niharika1234
New User
Joined: 01 May 2006 Posts: 9
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Dont know why put up multiple '+' signs when a single can do what is needed.
Regards,
Priyesh. |
|
Back to top |
|
|
shrivatsa Warnings : 1 Active User
Joined: 17 Mar 2006 Posts: 174 Location: Bangalore
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
shrivatsa Warnings : 1 Active User
Joined: 17 Mar 2006 Posts: 174 Location: Bangalore
|
|
|
|
I never tried this.
You may be correct.
Thanks
Shri |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Oh Jack... Thanks a lot... for clearing the doubt...
Regards,
Priyesh. |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
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 |
|
|
|