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



 >> 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 clause of PIC S9(9) COMP.

It is impossible to tell you how to define this in RPG without knowing the
original platform and version of COBOL.  I can guess though that it should
be 9B 0 and came from a mainframe.  The problem is that COMP means "the best
performing numeric type on the platform"  - for AS/400 COMP is equivalent to
COMP-3 (packed) but since S9(9) would require 5 bytes, it can't be that.  So
best guess is it came from a mainframe and is binary.  Depending on how the
mainframe program was compiled you might need to specify 10I 0 to get all
the digits.

Jon Paris
Partner400



-----Original Message-----
From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On
Behalf Of rpg400-l-request@midrange.com
Sent: Wednesday, October 17, 2001 5:34 PM
To: rpg400-l@midrange.com
Subject: RPG400-L digest, Vol 1 #149 - 14 msgs


Send RPG400-L mailing list submissions to
        rpg400-l@midrange.com

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or, via email, send a message with subject or body 'help' to
        rpg400-l-request@midrange.com

You can reach the person managing the list at
        rpg400-l-admin@midrange.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of RPG400-L digest..."


Today's Topics:

   1. RE: SETLL not working?...must be me (Scott Mildenberger)
   2. What to map this to? (Robert Upshall)
   3. RE: What to map this to? (Mark A. Manske)
   4. RE: What to map this to? (Tom Daly)
   5. RE: What to map this to? (Henderson, Oliver)
   6. RE: What to map this to? (Bale, Dan)
   7. RE: What to map this to? (Tom Daly)
   8. Re: What to map this to? (Dan Wiesner - CC)
   9. Checking for Valid Dates (John M. Bauman)
  10. RE: What to map this to? (Jim Langston)
  11. RE: Checking for Valid Dates (Bryan Yates)
  12. RE: Checking for Valid Dates (Scott Mildenberger)
  13. RE: Checking for Valid Dates (Bryan Yates)
  14. RE: What to map this to? (Reeve Fritchman)

--__--__--

Message: 1
From: Scott Mildenberger <Smildenber@Washcorp.com>
To: "'rpg400-l@midrange.com'" <rpg400-l@midrange.com>
Subject: RE: SETLL not working?...must be me
Date: Wed, 17 Oct 2001 14:30:59 -0600
Reply-To: rpg400-l@midrange.com

%eof doesn't get set by SETLL.

> -----Original Message-----
> From: Booth Martin [mailto:Booth@MartinVT.com]
> Sent: Wednesday, October 17, 2001 2:36 PM
> To: rpg400-l@midrange.com
> Subject: Re: SETLL not working?...must be me
>
>
> Try using the %BIF  %EOF.  I've found it much easier.
> --------------------------------------------
> Booth Martin
> Boothm@Goddard.edu
> 802-454-8315 x235
> --------------------------------------------
> -------Original Message-------
> From: rpg400-l@midrange.com
> Date: Wednesday, October 17, 2001 04:15:56 PM
> To: rpg400-l@midrange.com
> Subject: SETLL not working?...must be me
> i'v stared at this too long now....what am i missing?
> scenario:
> indexed file (JDEdwards F4211LP) with key of:
> account#
> document type
> item#
> date(julian)
> using account# (8,0) for SETLL operation (i.e. partial key)
> key_4211 klist
> kfld a5an8
> Code:
> key_4211 setll i4211
> if not%found(F4211LP)
> (do some stuff here)
> endif
> The code performs as though it FOUND a record, even though i know (and
> DFU confirms it) that there is NO record in the
> file for the selected account number
> _______________________________________________
> 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.
> _______________________________________________
> 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.
>

--__--__--

Message: 2
From: "Robert Upshall" <rupshall@psasoft.com>
To: <rpg400-l@midrange.com>
Subject: What to map this to?
Date: Wed, 17 Oct 2001 15:43:53 -0500
Reply-To: rpg400-l@midrange.com

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



--__--__--

Message: 3
From: "Mark A. Manske" <mmanske@minter-weisman.com>
To: <rpg400-l@midrange.com>
Subject: RE: What to map this to?
Date: Wed, 17 Oct 2001 15:54:00 -0500
Reply-To: rpg400-l@midrange.com

Mine must be rusty too, because the comp or was it like comp-3 meant the
field was packed
but that does not add up- length of four would only be a seven digit
field...


time to hit the manuals

-mark

-----Original Message-----
From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On
Behalf Of Robert Upshall
Sent: Wednesday, October 17, 2001 3: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.



--__--__--

Message: 4
From: Tom Daly <Tdaly@sddsystems.com>
To: "'rpg400-l@midrange.com'" <rpg400-l@midrange.com>
Subject: RE: What to map this to?
Date: Wed, 17 Oct 2001 16:54:15 -0400
Reply-To: rpg400-l@midrange.com

I think the 'COMP' means binary.  But I'm reaching way back for this one.  4
bytes binary is 10I 0.

Can you DSPPFM and eyeball it?


Tom

 |  -----Original Message-----
 |  From: Robert Upshall [mailto:rupshall@psasoft.com]
 |  Sent: Wednesday, October 17, 2001 16:44
 |  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.
 |

--__--__--

Message: 5
From: "Henderson, Oliver" <ohenderson@georgiacrown.com>
To: "'rpg400-l@midrange.com'" <rpg400-l@midrange.com>
Subject: RE: What to map this to?
Date: Wed, 17 Oct 2001 16:59:24 -0400
Reply-To: rpg400-l@midrange.com

COMP defines the field as Packed Decimal. However, a packed length of 4
would allow for the placement of 7 numeric characters plus a sign field.

-----Original Message-----
From: Robert Upshall [mailto:rupshall@psasoft.com]
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.

--__--__--

Message: 6
Subject: RE: What to map this to?
Date: Wed, 17 Oct 2001 17:00:22 -0400
From: "Bale, Dan" <Dan.Bale@handleman.com>
To: <rpg400-l@midrange.com>
Reply-To: rpg400-l@midrange.com

This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Wouldn't 9 digits fit in a 4-byte long binary field?  Don't know which
'COMP' that is, though.

I don't care to admit how long its been since I've written in COBOL.
You'll know I wasn't in my 20's.

Dan Bale
IT - AS/400
Handleman Company
248-362-4400  Ext. 4952
D.Bale@Handleman.com

> -----Original Message-----
> From: Mark A. Manske [SMTP:mmanske@minter-weisman.com]
> Sent: Wednesday, October 17, 2001 4:54 PM
> To:   rpg400-l@midrange.com
> Subject:      RE: What to map this to?
>
> Mine must be rusty too, because the comp or was it like comp-3 meant
> the
> field was packed
> but that does not add up- length of four would only be a seven digit
> field...
>
>
> time to hit the manuals
>
> -mark
>
> -----Original Message-----
> From: rpg400-l-admin@midrange.com
> [mailto:rpg400-l-admin@midrange.com]On
> Behalf Of Robert Upshall
> Sent: Wednesday, October 17, 2001 3: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

--__--__--

Message: 7
From: Tom Daly <Tdaly@sddsystems.com>
To: "'rpg400-l@midrange.com'" <rpg400-l@midrange.com>
Subject: RE: What to map this to?
Date: Wed, 17 Oct 2001 16:57:42 -0400
Reply-To: rpg400-l@midrange.com


Then again maybe it's COMP-3 for binary...


 |  -----Original Message-----
 |  From: Henderson, Oliver [mailto:ohenderson@georgiacrown.com]
 |  Sent: Wednesday, October 17, 2001 16:59
 |  To: 'rpg400-l@midrange.com'
 |  Subject: RE: What to map this to?
 |
 |
 |  COMP defines the field as Packed Decimal. However, a packed
 |  length of 4
 |  would allow for the placement of 7 numeric characters plus
 |  a sign field.

 |

--__--__--

Message: 8
From: "Dan Wiesner - CC" <dwiesner@charter.net>
To: <rpg400-l@midrange.com>
Subject: Re: What to map this to?
Date: Wed, 17 Oct 2001 16:09:28 -0500
Reply-To: rpg400-l@midrange.com

When in doubt, mumble.
Try a tape dump and see if you can read the data.
It's sounds like they gave you the wrong information.

Dan Wiesner

DMPTAP DEV(TAP01)
       TYPE(*ALL)
       DTABLK(1 10)




----- Original Message -----
From: "Robert Upshall" <rupshall@psasoft.com>
To: <rpg400-l@midrange.com>
Sent: Wednesday, October 17, 2001 3:43 PM
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.




--__--__--

Message: 9
Subject: Checking for Valid Dates
To: rpg400-l@midrange.com
From: "John M. Bauman" <JMBauman@wardtrucking.com>
Date: Wed, 17 Oct 2001 17:14:25 -0400
Reply-To: rpg400-l@midrange.com


Hi all I am new to the RPG ILE arena so I thought I would run this by
everyone.

 I have a date field in MMDDYY format on a screen, I will call it DDSDATE.
I EXFMT the screen and I move DDSDATE to a date field defined as MDY in my
RPG program.  I then check to see if the date is valid by using the TEST
opcode.  My problem is if the user typed in an invalid date, when I try to
move DDSDATE to date field in my RPG program it blows up on the move itself
stating that the date stamp is invalid.  Any suggestions.  (Note: I have
been programming in RPG III for about nine years)

Thanks

John M. Bauman
Lead Programmer
Ward Trucking
Second Avenue & Seventh Street, Greenwood
Altoona, Pa 16602

Voice: (800) 458-3625 Ext. 284
Voice Direct: (814) 947-1284 (Direct Line)
Fax: (814) 944-5470

Visit our website at http://www.wardtrucking.com


--__--__--

Message: 10
From: Jim Langston <jlangston@celsinc.com>
To: "'rpg400-l@midrange.com'" <rpg400-l@midrange.com>
Subject: RE: What to map this to?
Date: Wed, 17 Oct 2001 14:15:15 -0700
Reply-To: rpg400-l@midrange.com

try 10i (or 9i) and see if that extracts it.  If it was packed, 9 digits
would take up 5 bytes, not 4.  You could store 9 digits in a binary
value though, so that's most likely what it is.

Regards,

Jim Langston

If the data doesn't fit the specs, change the specs to fit the data.

-----Original Message-----
From: Robert Upshall [mailto:rupshall@psasoft.com]
Sent: Wednesday, October 17, 2001 1: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

--__--__--

Message: 11
Subject: RE: Checking for Valid Dates
Date: Wed, 17 Oct 2001 16:17:01 -0500
From: "Bryan Yates" <srprog3@co.collin.tx.us>
To: <rpg400-l@midrange.com>
Reply-To: rpg400-l@midrange.com

John use the test opcode on the date before you move. This works as well

C     *MDY           Test(DE) DDSDATE
C*
C                    If       not %error
etc.....

-----Original Message-----
From: John M. Bauman [mailto:JMBauman@wardtrucking.com]
Sent: Wednesday, October 17, 2001 4:14 PM
To: rpg400-l@midrange.com
Subject: Checking for Valid Dates



Hi all I am new to the RPG ILE arena so I thought I would run this by
everyone.

 I have a date field in MMDDYY format on a screen, I will call it
DDSDATE.
I EXFMT the screen and I move DDSDATE to a date field defined as MDY in
my
RPG program.  I then check to see if the date is valid by using the TEST
opcode.  My problem is if the user typed in an invalid date, when I try
to
move DDSDATE to date field in my RPG program it blows up on the move
itself
stating that the date stamp is invalid.  Any suggestions.  (Note: I have
been programming in RPG III for about nine years)

Thanks

John M. Bauman
Lead Programmer
Ward Trucking
Second Avenue & Seventh Street, Greenwood
Altoona, Pa 16602

Voice: (800) 458-3625 Ext. 284
Voice Direct: (814) 947-1284 (Direct Line)
Fax: (814) 944-5470

Visit our website at http://www.wardtrucking.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.


--__--__--

Message: 12
From: Scott Mildenberger <Smildenber@Washcorp.com>
To: "'rpg400-l@midrange.com'" <rpg400-l@midrange.com>
Subject: RE: Checking for Valid Dates
Date: Wed, 17 Oct 2001 15:05:32 -0600
Reply-To: rpg400-l@midrange.com

Do the TEST before moving it to the date field, if it is invalid then don't
move it to the date field.  Only valid dates can be moved to date fields.

Scott Mildenberger

> -----Original Message-----
> From: John M. Bauman [mailto:JMBauman@wardtrucking.com]
> Sent: Wednesday, October 17, 2001 3:14 PM
> To: rpg400-l@midrange.com
> Subject: Checking for Valid Dates
>
>
>
> Hi all I am new to the RPG ILE arena so I thought I would run this by
> everyone.
>
>  I have a date field in MMDDYY format on a screen, I will
> call it DDSDATE.
> I EXFMT the screen and I move DDSDATE to a date field defined
> as MDY in my
> RPG program.  I then check to see if the date is valid by
> using the TEST
> opcode.  My problem is if the user typed in an invalid date,
> when I try to
> move DDSDATE to date field in my RPG program it blows up on
> the move itself
> stating that the date stamp is invalid.  Any suggestions.
> (Note: I have
> been programming in RPG III for about nine years)
>
> Thanks
>
> John M. Bauman
> Lead Programmer
> Ward Trucking
> Second Avenue & Seventh Street, Greenwood
> Altoona, Pa 16602
>
> Voice: (800) 458-3625 Ext. 284
> Voice Direct: (814) 947-1284 (Direct Line)
> Fax: (814) 944-5470
>
> Visit our website at http://www.wardtrucking.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.
>

--__--__--

Message: 13
Subject: RE: Checking for Valid Dates
Date: Wed, 17 Oct 2001 16:22:15 -0500
From: "Bryan Yates" <srprog3@co.collin.tx.us>
To: <rpg400-l@midrange.com>
Reply-To: rpg400-l@midrange.com

Oops hit the wrong blasted key...As I was saying:
John use the test opcode on the date before you move. This works time
fields also.  I suggest John that you download the ILE RPG referenc
manual from the IBM site.  In PDF format it is completely indexed and
you can zip write to the bif or opcode of your choice.


C     *MDY           Test(DE) DDSDATE
C*
C                    If       not %error
etc.....


-----Original Message-----
From: John M. Bauman [mailto:JMBauman@wardtrucking.com]
Sent: Wednesday, October 17, 2001 4:14 PM
To: rpg400-l@midrange.com
Subject: Checking for Valid Dates



Hi all I am new to the RPG ILE arena so I thought I would run this by
everyone.

 I have a date field in MMDDYY format on a screen, I will call it
DDSDATE.
I EXFMT the screen and I move DDSDATE to a date field defined as MDY in
my
RPG program.  I then check to see if the date is valid by using the TEST
opcode.  My problem is if the user typed in an invalid date, when I try
to
move DDSDATE to date field in my RPG program it blows up on the move
itself
stating that the date stamp is invalid.  Any suggestions.  (Note: I have
been programming in RPG III for about nine years)

Thanks

John M. Bauman
Lead Programmer
Ward Trucking
Second Avenue & Seventh Street, Greenwood
Altoona, Pa 16602

Voice: (800) 458-3625 Ext. 284
Voice Direct: (814) 947-1284 (Direct Line)
Fax: (814) 944-5470

Visit our website at http://www.wardtrucking.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.


--__--__--

Message: 14
From: "Reeve Fritchman" <reeve@ltl400.com>
To: <rpg400-l@midrange.com>
Subject: RE: What to map this to?
Date: Wed, 17 Oct 2001 17:28:00 -0400
Reply-To: rpg400-l@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.



--__--__--

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) digest 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.



End of RPG400-L Digest



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.