View previous topic :: View next topic
|
Author |
Message |
venosol Warnings : 1 New User
Joined: 16 Nov 2006 Posts: 43 Location: Bangalore
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
venosol Warnings : 1 New User
Joined: 16 Nov 2006 Posts: 43 Location: Bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
venosol Warnings : 1 New User
Joined: 16 Nov 2006 Posts: 43 Location: Bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome |
|
Back to top |
|
|
|