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



Step 1: DMPTAP to check record length and block size.
Step 2: Copy records to *PRINT with *HEX option
Step 3: Inspect data format.  If the low-order (rightmost) zone is F/D
(mainframe uses other signs), and if the number is reasonable, it really is
packed.
Step 4: THIS IS IMPORTANT: trust no one, and trust nobody's documentation!

In ILE COBOL, "COMP" means "packed decimal"; the definition appears to be
packed 9-digit number with 0 decimals.  But 4 bytes isn't enough for a
9-digit number.
.

-----Original Message-----
From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On
Behalf Of Robert Upshall
Sent: Wednesday, October 17, 2001 4:44 PM
To: rpg400-l@midrange.com
Subject: What to map this to?

I have a tape that I am being sent by a customer.  I have to input the file
and convert it to our format.

I have a record layout from our customer but it appears the file was created
with COBOL, we use RPG.

My problem is I'm not sure how to input one of the fields.  The field is
defined as positions 21-24, length 4, with a pic claus of PIC S9(9) COMP.
My COBOL is very rusty, I have looked at or written a program since college
and from my memory S9(9) would be a value of -999999999 to +999999999 ...
how does this fit into a feild of lenght 4 and how do I read this value
properly in RPG?


Robert Upshall
Professional Software of Amarillo
(806) 358-8928
rupshall@psasoft.com


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



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.