Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
COMP3 and COMP equivalent

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: COMP3 and COMP equivalent
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

Site Director


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

PostPosted: Tue Mar 11, 2008 7:36 am    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

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

Thanks Dick, will do that..

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

Active Member


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

PostPosted: Wed Mar 12, 2008 6:09 pm    Post subject:
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    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 Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Need help to populate date in COMP-3 ... chetanambi DFSORT/ICETOOL 3 Tue Jun 21, 2016 12:25 pm
No new posts comparing comp-3 and unpacked numbers juares castro COBOL Programming 3 Mon May 30, 2016 6:46 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us