From: Elvira Sojli on 23 Jan 2010 09:13 Dear all, I have been given a binary file with two fields, integer fields (big endian binary encoded numbers) and alpha fields (left justified and padded on the right with spaces). The example of the equivalent file in ASCII format (which is not avaialbe to me) is: T23584 6 M148 4 SO 2 T24110 6 M283 4 RA T 100N 16 M284 4 RAA T 100N 16 RAA- T 100N 16 M285 4 RAAC T 100N 16 M286 4 The first alphabet is always a "message" type which can be "T", "M", "S" and "R". If the message is "T" (length 1), a numeric will be given (23584 with length of 5). The length of the message will be given last (6). There are three set of information associated with message "T" If the message is "M" (length 1), a numeric will be given (148 with length of 3). The length of the message will be given last (1+3=4). There are three set of information associated with message "T" If the message is "S" (length 1), an alphanumeric will be given ("O" with length of 1). The length of the message will be given last (1+1=2). There are three set of information associated with message "T" If the message is "R" (length 1), 1) An alphabetic will be given (A (with spaces) with length of 6). 2) An alphanumeric will be given ("T" with length of 1) 3) An alphanumeric will be given ("empty Space" with length of 1) 4) A numeric will be given (100 with length of 6) 5) An alphabetic will be given (N with length of 1) 6) total length (1+6+1+1+6+1=16) I am wondering how do I get started reading this form of binary file in SAS. Thanks for the time, Elvira
|
Pages: 1 Prev: PROC FREQ v9.2 error win xp/sp2 or win7 Next: Partial Nesting in Proc Mixed |