× 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.



Shahid,

If the data is of the form x"123456", then I have processed it as follows:

05  PACKQTY  PIC X(3).

05  WS-PACKQTY-AREA.
    10  WS-PACKQTY-COMP-6 PIC X(3).
    10  FILLER                               PIC SV9 COMP-3 VALUE ZERO.
05  WS-PACKQTY-COMP-3  REDEFINES WS-PACKQTY-AREA  PIC S9(6)V9 COMP-3.

MOVE PACKQTY TO WS-PACKQTY-COMP-6.

After the move, WS-PACKQTY-COMP-3 should hold the value of PACKQTY in a
COMP-3 format.

Peter.

----- Original Message -----
From: "Shahid Yaqoob" <syaqoob@acp.com.sa>
To: <COBOL400-L@midrange.com>
Sent: Wednesday, November 01, 2000 12:55 PM
Subject: Re: Unsigned Packed Decimal Data


>
>
> Here is the example of unsigned packed decimal data which was supported by
> RM-COBOL only.
> 05  PACKQTY                     PIC 9(6)       COMP-6.
> 05  ORGDATE                    PIC 9(6)       COMP-6.
> 05  MDATE                          PIC 9(6)       COMP-6.
> 05  USER                             PIC 99          COMP-6.
> 05  DESC                             PIC X(19).
> 05  FILLER                          PIC X(39).
>
> The attatched save file has sample records according to the above format
> (See attached file: Comp6.dta)
>
+---
| This is the COBOL/400 Mailing List!
| To submit a new message, send your mail to COBOL400-L@midrange.com.
| To subscribe to this list send email to COBOL400-L-SUB@midrange.com.
| To unsubscribe from this list send email to COBOL400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---END


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.