× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



[ Converted text/html to text/plain ]

I changed to COMP-4 on the AS/400 and it works like a charm!!! :-))

Thanks a million!!

Thanks

Dennis Nel
Technical Consultant: AS/400

*       DNel3@oldmutual.com <mailto:Dnel3@oldmutual.com[1]>
*       (021) 509-3459
*       (082) 808-2687

-----Original Message-----
From: Leif Svalgaard [mailto:leif@leif.org[2]]
Sent: 15 October 2001 06:17
To: cobol400-l@midrange.com
Subject: Re: PIC S9(9) COMP field definition.

From: Nel Dennis <DNel3@OLDMUTUAL.com>
> I have the following problem. We have a Cobol program running on the
Mainframe
> with the following COPYBOOK in the Working Storage Section;
>
> 07      R-CLIENT                PIC S9(9) COMP.
> 07      D-FROM-MTH      PIC S9(4) COMP.
> 07      D-FROM-DD       PIC S9(2) COMP.
>
> We have written some code on the AS/400 which does a call via "ECS" to get
> data from the Mainframe via this COPYBOOK.
>
> I have captured the Copybook on the AS/400 exactly the same as the COPYBOOK
on
> the Mainframe. BUT when I access the data it is different on the
AS/400!! );-
>
> Should I be defining the fields differently on the AS/400? If so how?

On the IBM 390 mainframe, COMP is by default binary (same as COMP-4).
On the AS/400, COMP is by default packed (same as COMP-3). You have
to choose among the two. If the data is coming from the mainframe, declare
it as COMP-4 on the AS/400.
Instead of COMP-4 and COMP-3, you can also use BINARY and PACKED,
but they have to be the same on both sides.

_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
To post a message email: COBOL400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l[3]
or email: COBOL400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l[4].

===References:===
  1. mailto:Dnel3@oldmutual.com
  2. mailto:leif@leif.org
  3. http://lists.midrange.com/cgi-bin/listinfo/cobol400-l
  4. http://archive.midrange.com/cobol400-l



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.