MicroFocus COBOL data is similar to standard zoned decimal numeric data in that the last byte is a letter or symbol that contains the value's sign along with the last digit. MicroFocus COBOL data is only signed if it is negative. The last character conforms to this layout:
p=0 u=5 q=1 v=6 r=2 w=7 s=3 x=8 t=4 y=9
For example, in MicroFocus Cobol the value -123 is written as 12s.
Beginning in SAS 9.2, a new informat VMSZNw.d reads this type of data.Prior to SAS 9.2, this data can be read on VMS with the VMSZNw.d informat. On other operating systems, values can be read using the following sample code:
data _null_; input mfc $char6.; len=length(mfc); substr(mfc,len,1)=translate(substr(mfc,len,1), '{ABCDEFGHI}JKLMNOPQR', '0123456789pqrstuvwxy'); n=input(mfc,zd6.); put n=; cards; 543210 543211 543212 543213 54321p 54321q 54321r 54321s ; run;
Product Family | Product | System | Product Release | SAS Release | ||
Reported | Fixed* | Reported | Fixed* | |||
SAS System | Base SAS | 64-bit Enabled Solaris | 9.2 | 9.2 TS1M0 | ||
64-bit Enabled HP-UX | 9.2 | 9.2 TS1M0 | ||||
z/OS | 9.2 | 9.2 TS1M0 | ||||
z/OS 64-bit | 9.2 | 9.2 TS1M0 | ||||
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 | 9.2 TS1M0 | ||||
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 | 9.2 TS1M0 | ||||
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 | 9.2 TS1M0 | ||||
Microsoft Windows XP 64-bit Edition | 9.2 | 9.2 TS1M0 | ||||
Microsoft® Windows® for x64 | 9.2 | 9.2 TS1M0 | ||||
Microsoft Windows Server 2003 Datacenter Edition | 9.2 | 9.2 TS1M0 | ||||
Microsoft Windows Server 2003 Enterprise Edition | 9.2 | 9.2 TS1M0 | ||||
Microsoft Windows Server 2003 Standard Edition | 9.2 | 9.2 TS1M0 | ||||
Microsoft Windows XP Professional | 9.2 | 9.2 TS1M0 | ||||
Windows Vista | 9.2 | 9.2 TS1M0 | ||||
Windows Vista for x64 | 9.2 | 9.2 TS1M0 | ||||
64-bit Enabled AIX | 9.2 | 9.2 TS1M0 | ||||
HP-UX IPF | 9.2 | 9.2 TS1M0 | ||||
Linux | 9.2 | 9.2 TS1M0 | ||||
Linux for x64 | 9.2 | 9.2 TS1M0 | ||||
OpenVMS on HP Integrity | 9.2 | 9.2 TS1M0 | ||||
Solaris for x64 | 9.2 | 9.2 TS1M0 |
/* The 'y' in the last position represents a 9 and makes the entire
value negative */
data a;
infile datalines truncover;
input x vmszn5.;
datalines;
1234y
;
proc print;run;
Obs x 1 -12349
Type: | Usage Note |
Priority: | |
Topic: | SAS Reference ==> Informats ==> Date and Time ==> VMSZN Common Programming Tasks ==> Reading and Writing External Data |
Date Modified: | 2023-04-05 13:45:00 |
Date Created: | 2005-11-21 13:22:22 |