IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

PICTURE Clause Editing characters


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 3156
Location: Tucson AZ

PostPosted: Sun Mar 18, 2007 6:34 pm
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Mar 18, 2007 11:26 pm
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: 3156
Location: Tucson AZ

PostPosted: Sun Mar 18, 2007 11:49 pm
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
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Mar 19, 2007 8:20 am
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
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Mar 20, 2007 7:03 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts To search DB2 table based on Conditio... DB2 1
No new posts Count the number of characters in a f... CA Products 1
No new posts Tilde Characters Changing to COLONs i... CLIST & REXX 22
Search our Forums:

Back to Top