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 Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm


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