Date: Sat, 9 Sep 2000 12:14:19 -0500
Reply-To: Michael S Hines <mshines@PURDUE.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Michael S Hines <mshines@PURDUE.EDU>
Subject: Re: COBOL Layouts
Content-Type: text/plain; charset="iso-8859-1"
PD3.0 is correct - the lenght in the PD format is bytes.. not digits. PD
internal format uses n+1 nibbles rounded up to get bytes (a nibble is half a
byte). in this case you have n=5 so there are 6 nibbles, or 3 bytes of
If you are referring to the SAS tullity - COB2SAS, I am suprized that it
didn't get this right.
the +1 in the n+1 formula is for the sign - which is at the far right end,
which in your example is C for positive. the sign can also be F for
positive, or D for negative.
hope this helps somewhat....
Michael S Hines
OS/390 Systems Programmer
1061 Freehafer Hall
West Lafayette, IN 47907-1061
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Kim
Sent: Friday, September 08, 2000 1:45 PM
Subject: COBOL Layouts
I was given an incomplete COBOL layout that isn't working when I use the
SAS utility to create a SAS INPUT statement. Thus, I've resorted to
writing my own (sigh!!!).
I was given the following:
10 INTSLS-VSA-USE PIC S9(5)V USAGE COMP-3.
I was told by a COBOL person who also knows SAS that I should use PD5.0.
This didn't work--lots of warning messages in my SAS log, and no values
reported for this field. Since I know this field shouldn't be empty, I
thought I'd try PD3.0 after reading the SAS On-line Documentation.
What I'm hoping is that somebody can verify that I'm correctly using this
informat. If I use the ISPF editor, and type HEX, the field looks like
When using informat PD5.0, I get a missing variable. When I use PD3.0, I
get numeric value of 5 in my SAS dataset. If I have chosen the right
informat, is it the COMP-3 in the COBOL layout that would drive me to use
I hope this note makes sense. Every time I venture into COBOL, nothing
makes sense. (As you can probably guess, I'm working in MVS land.)
A SAS Quality Partner (tm)