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

COMP3 and COMP equivalent


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
venktv

New User


Joined: 29 Mar 2006
Posts: 59
Location: Montreal

PostPosted: Mon Mar 10, 2008 4:51 pm
Reply with quote

Hi All,

Just I want to know the equivalent DISPLAY type PIC clause for these following picture clauses

10 SYSID PIC S9(17) COMP-3.
10 CODE PIC S9(09) COMP.

venkat
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 11, 2008 7:36 am
Reply with quote

Hello,

If you "DISPLAY" them, they will display. . . .

Probably not the answer you were looking for, but all i'll try withnwhat you posted.

If you post some sample input and the output you want, someone will have a more usable suggestion.
Back to top
View user's profile Send private message
venktv

New User


Joined: 29 Mar 2006
Posts: 59
Location: Montreal

PostPosted: Tue Mar 11, 2008 9:00 am
Reply with quote

Hi Dick,

Thanks for the reply, the reason for converting is differnt, I am FTPing a file from mainframe to NT server, the FTP file contains two fields with above PIC clause, so I am thikning whether the data will be in correct format or not when we receive the file in NT server, please let me know if u have answer for this..

Thannks in advance
Venkat
Back to top
View user's profile Send private message
hmurali
Warnings : 1

New User


Joined: 08 Mar 2005
Posts: 17

PostPosted: Tue Mar 11, 2008 12:01 pm
Reply with quote

Hi Venkat,
to the best of my knowledge, we have FTP comp data and there will be no display issues. if we try to ftp comp3, it would be displayed correctly.
Back to top
View user's profile Send private message
venktv

New User


Joined: 29 Mar 2006
Posts: 59
Location: Montreal

PostPosted: Tue Mar 11, 2008 4:15 pm
Reply with quote

Hi Murali,

Thanks for the reply, if that is true, it will be great...but if anyone has any concerns on this ..pls post here... bez i am in the middle of coding I cant test it now...

Thanks in advance
Venkat
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Mar 11, 2008 5:11 pm
Reply with quote

When transferring data by FTP the data should be in character format, no binary or packed decimal and with a separate sign. You need to check and find out if the application on the receiving end wants to sign at the beginning or the end of the number.
Back to top
View user's profile Send private message
venktv

New User


Joined: 29 Mar 2006
Posts: 59
Location: Montreal

PostPosted: Tue Mar 11, 2008 5:37 pm
Reply with quote

Thanks Craq..
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 11, 2008 10:01 pm
Reply with quote

Hello,

Quote:
no binary or packed decimal
Very important.

The easiest way i've found to get usable values on the target system is to simply MOVE the comp/packed fields to edited fields before sending the ftp (i.e. code-fld pic 999999999-.).

Also, i'd suggest changing the name of the field CODE to some other name.
Back to top
View user's profile Send private message
venktv

New User


Joined: 29 Mar 2006
Posts: 59
Location: Montreal

PostPosted: Wed Mar 12, 2008 10:33 am
Reply with quote

Thanks Dick, will do that..

With regards
Venkat
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Wed Mar 12, 2008 6:09 pm
Reply with quote

If your PIC is 999999999+, won't that put a + or - at the end, rather than a blank or -?

That might look better for eyeball testing.
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 COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts File matching functionality in Easytr... DFSORT/ICETOOL 14
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Cobol Db2 program (inserting Char Equ... COBOL Programming 0
Search our Forums:

Back to Top