View previous topic :: View next topic
|
Author |
Message |
Anbutheone
New User
Joined: 08 Oct 2008 Posts: 15 Location: Bangalore
|
|
|
|
Hi,
I am trying to read a file which created using cobol.
One field is defined as S9(4) COMP.
I tried reading it using PD2. in SAS but it is saying invalid datatype.
PLease can anyone tell mw what is correct data type for this?
Thanks in Advance,
Anbu |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
PIB2. ?
or IB2.
edited to consolidate two posts and reduce clutter |
|
Back to top |
|
|
Anbutheone
New User
Joined: 08 Oct 2008 Posts: 15 Location: Bangalore
|
|
|
|
I used IB2. it worked fine.
Thank you. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
PD is Packed Decimal -- COBOL calls this COMP-3.
IB is Integer Binary -- COBOL calls this COMP.
If you have to read much data written by COBOL, you would vastly helped by getting on the SAS web site and understanding the various INFORMAT specifiers and how they relate to COBOL USAGE clauses. |
|
Back to top |
|
|
|