From: Dianne Rhodes on
On Thu, 14 Sep 2006 09:57:00 -0700, sdlenter <sdlentert(a)AOL.COM> wrote:

>that really didn't help...
>is it like PD?
>
>

No, it wasn't was it? Seems we are picking up the bad habit of not being
useful. If you are on the MF you want PD and RB. From the on-line
documentation:
The following table compares packed decimal notation in several
programming languages:


Language Notation
SAS PD4.
COBOL COMP-3 PIC S9(7)
IBM 370 assembler PL4
PL/I FIXED DEC


The following table compares the names of real binary notation in several
programming languages:

Language 4 Bytes 8 Bytes
SAS RB4. RB8.
FORTRAN REAL*4 REAL*8
C float double
COBOL COMP-1 COMP-2
IBM 370 assembler E D

I believe in COBOL Comp is the same as comp-1. I've never seen comp-2
myself.

If you aren't on the mainframe, use the corresponding S370 formats Mark
mentioned.

Dianne Rhodes @ BLS
part of the COBOL cabal
From: "Terjeson, Mark" on
The other part that comes into play is
what platform(s) you would be referring
to. Is this a mainframe or mini platform,
i.e. EBCDIC or ASCII? or is this files
from an EBCDIC to an ASCII system? The
real question is what state(or flavor) is
the data currently in? Is it EBCDIC and
staying EBCDIC, or EBCDIC downloaded to
an ASCII platform? and has the file already
been converted from EBCDIC to ASCII?

If we start with the later, already converted
to ASCII then the bytes and nibbles for the
PD or ZD fields have already been corrupt.
i.e. you do not want the EBCDIC byte values
mapped to the ASCII character set. you want
them to stay intact if going to an ASCII
platform. To do this download from the EBCDIC
platform to the ASCII platform with FTP and
change the mode from ASCII to BINARY which
tells FTP not to convert but to leave all
the bytes as is in the file. Then the S370xxx
formats work just great, and to grab the other
text pieces just use $ebcdic. informat to
toggle (map) the character text pieces.

Most importantly, if you can do a dump or
somehow write a small utility to display
the byte values on the original platform, you
can visibly see the nibble digits(half bytes)
and see the actual number and the letter flags
for the sign nibble, etc. You can follow this
through to the destination machine and see if
you have the original bytes or if an undesired
conversion has already taken place.

Of course, there may be something else in play
here for you, but typically, if you keep the
flavor of the file straight and use the canned
informats, it usually works just fine.



Hope this is helpful.


Mark Terjeson
Senior Programmer Analyst, IM&R
Russell Investment Group


Russell
Global Leaders in Multi-Manager Investing






-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of
sdlenter
Sent: Thursday, September 14, 2006 9:57 AM
To: SAS-L(a)LISTSERV.UGA.EDU
Subject: Re: Converting Cobol PIC to SAS informats

that really didn't help...
is it like PD?



"Terjeson, Mark" wrote:
> Hi,
>
> See the SAS Informat S370FPDw.d for COBOL 9(n) See the SAS Informat
> S370FZDw.d for COBOL S9(n)
>
>
>
> Hope this is helpful.
>
>
> Mark Terjeson
> Senior Programmer Analyst, IM&R
> Russell Investment Group
>
>
> Russell
> Global Leaders in Multi-Manager Investing
>
>
>
>
>
>
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of
> sdlenter
> Sent: Wednesday, September 13, 2006 3:00 PM
> To: SAS-L(a)LISTSERV.UGA.EDU
> Subject: Converting Cobol PIC to SAS informats
>
> How do I convert the following :
> PICTURE S9(05)V99 COMP-3
> PICTURE S9(11)V99 COMP-3.
> PICTURE S9(11) COMP-3.
> PICTURE S9(13) COMP-3.
> PICTURE S9(05) COMP-3.
> PICTURE S9(03) COMP-3.
> PICTURE S9(15) COMP-3.
>
> PICTURE S9(04) COMP.
> PICTURE S9(18) COMP.
From: "Terjeson, Mark" on
PS: If your original data file is not EBCDIC, then
you may need to check the SAS informats PDw.d and ZDw.d
as the S370 notation adds the EBCDIC conversion to the
process.

Mark


-----Original Message-----
From: Terjeson, Mark
Sent: Thursday, September 14, 2006 10:26 AM
To: 'sdlenter'; SAS-L(a)LISTSERV.UGA.EDU
Subject: RE: Re: Converting Cobol PIC to SAS informats

The other part that comes into play is
what platform(s) you would be referring
to. Is this a mainframe or mini platform,
i.e. EBCDIC or ASCII? or is this files
from an EBCDIC to an ASCII system? The
real question is what state(or flavor) is the data currently in? Is it
EBCDIC and staying EBCDIC, or EBCDIC downloaded to an ASCII platform?
and has the file already been converted from EBCDIC to ASCII?

If we start with the later, already converted to ASCII then the bytes
and nibbles for the PD or ZD fields have already been corrupt.
i.e. you do not want the EBCDIC byte values mapped to the ASCII
character set. you want them to stay intact if going to an ASCII
platform. To do this download from the EBCDIC platform to the ASCII
platform with FTP and change the mode from ASCII to BINARY which tells
FTP not to convert but to leave all the bytes as is in the file. Then
the S370xxx formats work just great, and to grab the other text pieces
just use $ebcdic. informat to toggle (map) the character text pieces.

Most importantly, if you can do a dump or somehow write a small utility
to display the byte values on the original platform, you can visibly see
the nibble digits(half bytes) and see the actual number and the letter
flags for the sign nibble, etc. You can follow this through to the
destination machine and see if you have the original bytes or if an
undesired conversion has already taken place.

Of course, there may be something else in play here for you, but
typically, if you keep the flavor of the file straight and use the
canned informats, it usually works just fine.



Hope this is helpful.


Mark Terjeson
Senior Programmer Analyst, IM&R
Russell Investment Group


Russell
Global Leaders in Multi-Manager Investing






-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of
sdlenter
Sent: Thursday, September 14, 2006 9:57 AM
To: SAS-L(a)LISTSERV.UGA.EDU
Subject: Re: Converting Cobol PIC to SAS informats

that really didn't help...
is it like PD?



"Terjeson, Mark" wrote:
> Hi,
>
> See the SAS Informat S370FPDw.d for COBOL 9(n) See the SAS Informat
> S370FZDw.d for COBOL S9(n)
>
>
>
> Hope this is helpful.
>
>
> Mark Terjeson
> Senior Programmer Analyst, IM&R
> Russell Investment Group
>
>
> Russell
> Global Leaders in Multi-Manager Investing
>
>
>
>
>
>
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of
> sdlenter
> Sent: Wednesday, September 13, 2006 3:00 PM
> To: SAS-L(a)LISTSERV.UGA.EDU
> Subject: Converting Cobol PIC to SAS informats
>
> How do I convert the following :
> PICTURE S9(05)V99 COMP-3
> PICTURE S9(11)V99 COMP-3.
> PICTURE S9(11) COMP-3.
> PICTURE S9(13) COMP-3.
> PICTURE S9(05) COMP-3.
> PICTURE S9(03) COMP-3.
> PICTURE S9(15) COMP-3.
>
> PICTURE S9(04) COMP.
> PICTURE S9(18) COMP.
From: "Terjeson, Mark" on
PPS: Excuse me, a better way to state it is if you are
on EBCDIC and staying on EBCDIC, or you are on ASCII and
staying on ASCII, then check out the informats PD and ZD

Mark


-----Original Message-----
From: Terjeson, Mark
Sent: Thursday, September 14, 2006 10:29 AM
To: 'sdlenter'; 'SAS-L(a)LISTSERV.UGA.EDU'
Subject: RE: Re: Converting Cobol PIC to SAS informats

PS: If your original data file is not EBCDIC, then you may need to check
the SAS informats PDw.d and ZDw.d as the S370 notation adds the EBCDIC
conversion to the process.

Mark


-----Original Message-----
From: Terjeson, Mark
Sent: Thursday, September 14, 2006 10:26 AM
To: 'sdlenter'; SAS-L(a)LISTSERV.UGA.EDU
Subject: RE: Re: Converting Cobol PIC to SAS informats

The other part that comes into play is
what platform(s) you would be referring
to. Is this a mainframe or mini platform,
i.e. EBCDIC or ASCII? or is this files
from an EBCDIC to an ASCII system? The
real question is what state(or flavor) is the data currently in? Is it
EBCDIC and staying EBCDIC, or EBCDIC downloaded to an ASCII platform?
and has the file already been converted from EBCDIC to ASCII?

If we start with the later, already converted to ASCII then the bytes
and nibbles for the PD or ZD fields have already been corrupt.
i.e. you do not want the EBCDIC byte values mapped to the ASCII
character set. you want them to stay intact if going to an ASCII
platform. To do this download from the EBCDIC platform to the ASCII
platform with FTP and change the mode from ASCII to BINARY which tells
FTP not to convert but to leave all the bytes as is in the file. Then
the S370xxx formats work just great, and to grab the other text pieces
just use $ebcdic. informat to toggle (map) the character text pieces.

Most importantly, if you can do a dump or somehow write a small utility
to display the byte values on the original platform, you can visibly see
the nibble digits(half bytes) and see the actual number and the letter
flags for the sign nibble, etc. You can follow this through to the
destination machine and see if you have the original bytes or if an
undesired conversion has already taken place.

Of course, there may be something else in play here for you, but
typically, if you keep the flavor of the file straight and use the
canned informats, it usually works just fine.



Hope this is helpful.


Mark Terjeson
Senior Programmer Analyst, IM&R
Russell Investment Group


Russell
Global Leaders in Multi-Manager Investing






-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of
sdlenter
Sent: Thursday, September 14, 2006 9:57 AM
To: SAS-L(a)LISTSERV.UGA.EDU
Subject: Re: Converting Cobol PIC to SAS informats

that really didn't help...
is it like PD?



"Terjeson, Mark" wrote:
> Hi,
>
> See the SAS Informat S370FPDw.d for COBOL 9(n) See the SAS Informat
> S370FZDw.d for COBOL S9(n)
>
>
>
> Hope this is helpful.
>
>
> Mark Terjeson
> Senior Programmer Analyst, IM&R
> Russell Investment Group
>
>
> Russell
> Global Leaders in Multi-Manager Investing
>
>
>
>
>
>
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of
> sdlenter
> Sent: Wednesday, September 13, 2006 3:00 PM
> To: SAS-L(a)LISTSERV.UGA.EDU
> Subject: Converting Cobol PIC to SAS informats
>
> How do I convert the following :
> PICTURE S9(05)V99 COMP-3
> PICTURE S9(11)V99 COMP-3.
> PICTURE S9(11) COMP-3.
> PICTURE S9(13) COMP-3.
> PICTURE S9(05) COMP-3.
> PICTURE S9(03) COMP-3.
> PICTURE S9(15) COMP-3.
>
> PICTURE S9(04) COMP.
> PICTURE S9(18) COMP.