IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SAS Equivalent for COBOL datatype COMP


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anbutheone

New User


Joined: 08 Oct 2008
Posts: 15
Location: Bangalore

PostPosted: Wed Nov 18, 2009 1:45 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Nov 18, 2009 2:03 pm
Reply with quote

PIB2. ?
or IB2.

edited to consolidate two posts and reduce clutter
Back to top
View user's profile Send private message
Anbutheone

New User


Joined: 08 Oct 2008
Posts: 15
Location: Bangalore

PostPosted: Wed Nov 18, 2009 2:36 pm
Reply with quote

I used IB2. it worked fine.

Thank you.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 18, 2009 6:04 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top