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
 

 

PICTURE Clause Editing characters

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

New User


Joined: 16 Nov 2006
Posts: 43
Location: Bangalore

PostPosted: Sun Mar 18, 2007 3:49 pm    Post subject: PICTURE Clause Editing characters
Reply with quote

I got confusion in edit pictures in cobol. I referred so many materials all are having their own explanations.

Code:

         Sending item             recieving item
    picture       contents     picture         contents
1.  PIC 9(9)     123456789    PIC 999B99B9999  123456789
2.  PIC x(10)     PASMITH     PIC XBXBX(8)     P A SMITH
3.  PIC S999       005-       PIC ----           -5
4.  PIC 99         34         PIC +++            +34
5.  PIC S9(4)     -0080       PIC ----9         bb-80



Please clarify whether the recieving contents are correct or not. try to identify the sending item and recieving item which are in the same line.
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sun Mar 18, 2007 6:34 pm    Post subject:
Reply with quote

1 does not show the blanks.
2 looked illegal but upon further checking looks good.
3 looks good but since you included the leading spaces on 5 you should have included them here.
4 looks good.
5 looks good.
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: Sun Mar 18, 2007 11:26 pm    Post subject:
Reply with quote

Hello,

Just ran the above as a test:
Code:
Item 1 results in |123 45 6789|
 Item 2            |  P ASMITH|
 Item 3            |  -5|
 Item 4            |+34|
 Item 5            |  -80|


Unfortunately, this terminal emulator does not support copy/paste.

The only item of note to me was Item 2. With a blank in front of the "P", the first initial shifts to the right.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sun Mar 18, 2007 11:49 pm    Post subject:
Reply with quote

dick scherrer wrote:
The only item of note to me was Item 2. With a blank in front of the "P", the first initial shifts to the right.
I think that was my fault when I "coded" it, I didn't bother to line them up...you should have seen it before...
Back to top
View user's profile Send private message
venosol
Warnings : 1

New User


Joined: 16 Nov 2006
Posts: 43
Location: Bangalore

PostPosted: Mon Mar 19, 2007 8:04 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Just ran the above as a test:
Code:
Item 1 results in |123 45 6789|
 Item 2            |  P ASMITH|
 Item 3            |  -5|
 Item 4            |+34|
 Item 5            |  -80|


Unfortunately, this terminal emulator does not support copy/paste.

The only item of note to me was Item 2. With a blank in front of the "P", the first initial shifts to the right.



Why it is giving different outputs for item 1 and item2 and for 3 and 4
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 Mar 19, 2007 8:20 am    Post subject:
Reply with quote

Hello,

Please clarify:
Quote:
Why it is giving different outputs for item 1 and item2 and for 3 and 4

I'm not sure which difference(s) you ask about.

Given the data, as i understood the question, and given the output pictures specifiedc, the output is what i expected. The item that i was curious about was the space in fromt of the PASMITH. Given the leading space, that output value matched the output picture.
Back to top
View user's profile Send private message
venosol
Warnings : 1

New User


Joined: 16 Nov 2006
Posts: 43
Location: Bangalore

PostPosted: Tue Mar 20, 2007 9:19 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Please clarify:
Quote:
Why it is giving different outputs for item 1 and item2 and for 3 and 4

I'm not sure which difference(s) you ask about.

Given the data, as i understood the question, and given the output pictures specifiedc, the output is what i expected. The item that i was curious about was the space in fromt of the PASMITH. Given the leading space, that output value matched the output picture.


Thanx I got clear idea.
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: Tue Mar 20, 2007 7:03 pm    Post subject:
Reply with quote

You're welcome icon_smile.gif
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 Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm
No new posts Remove Special Characters from Mainfr... Rodger Zhang All Other Mainframe Topics 6 Wed Jul 06, 2016 1:12 am
No new posts Trasnmitting a file with french chara... spoorni IBM Tools 1 Wed Feb 24, 2016 8:13 pm
No new posts Editing "member generations"... Ricardo Viegas TSO/ISPF 1 Tue Dec 29, 2015 7:27 pm
No new posts FTP of french characters in a txt fil... naresh54 IBM Tools 2 Thu Nov 12, 2015 8:12 am


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