Problem Note 42449: The sample program COB2SAS that is supplied with SAS® software does not map REDEFINES copybook statements accurately
The sample program COB2SAS that is supplied with SAS software does not map REDEFINES copybook statements accurately. Although the INFORMATS are built properly, the column pointers are positioned incorrectly.
Note the COPYBOOK file in the following example:
05 ADDRESS-RECORD.
10 ADDR-CASE-RCD-KEY.
15 ADDR-CASE-COMPANY-ID PIC X(02).
10 ADDR-UID-KEY REDEFINES ADDR-CASE-RCD-KEY.
15 ADDR-UID-COMPANY-ID PIC X(02).
10 ADDR-UID-RECORD.
15 ADDR-UID-NO PIC X(02).
10 ADDR-MISC-RECORD REDEFINES ADDR-UID-RECORD.
15 ADDR-NAME-TYPE PIC X(02).
The preceding COPYBOOK file produces the following incorrect INPUT statement:
/* INFILE */
INPUT
@1 ADDR_CASE_COMPANY_ID $EBCDIC2.
@1 ADDR_UID_COMPANY_ID $EBCDIC2.
@1 ADDR_UID_NO $EBCDIC2.
@1 ADDR_NAME_TYPE $EBCDIC2.
;
A correct INPUT statement should have the appearance of the following example:
/* INFILE */
INPUT
@1 ADDR_CASE_COMPANY_ID $EBCDIC2.
@1 ADDR_UID_COMPANY_ID $EBCDIC2.
@3 ADDR_UID_NO $EBCDIC2.
@3 ADDR_NAME_TYPE $EBCDIC2.
;
The COB2SAS program is provided as is, with known limitations. The only circumvention is to correct the generated INPUT statement manually.
An update of this sample program is under consideration.
Operating System and Release Information
SAS System | Base SAS | z/OS | | |
Z64 | | |
OpenVMS VAX | | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | | |
Microsoft Windows XP 64-bit Edition | | |
Microsoft® Windows® for x64 | | |
OS/2 | | |
Microsoft Windows 95/98 | | |
Microsoft Windows 2000 Advanced Server | | |
Microsoft Windows 2000 Datacenter Server | | |
Microsoft Windows 2000 Server | | |
Microsoft Windows 2000 Professional | | |
Microsoft Windows NT Workstation | | |
Microsoft Windows Server 2003 Datacenter Edition | | |
Microsoft Windows Server 2003 Enterprise Edition | | |
Microsoft Windows Server 2003 Standard Edition | | |
Microsoft Windows Server 2003 for x64 | | |
Microsoft Windows Server 2008 | | |
Microsoft Windows Server 2008 for x64 | | |
Microsoft Windows XP Professional | | |
Windows 7 Enterprise 32 bit | | |
Windows 7 Enterprise x64 | | |
Windows 7 Home Premium 32 bit | | |
Windows 7 Home Premium x64 | | |
Windows 7 Professional 32 bit | | |
Windows 7 Professional x64 | | |
Windows 7 Ultimate 32 bit | | |
Windows 7 Ultimate x64 | | |
Windows Millennium Edition (Me) | | |
Windows Vista | | |
Windows Vista for x64 | | |
64-bit Enabled AIX | | |
64-bit Enabled HP-UX | | |
64-bit Enabled Solaris | | |
ABI+ for Intel Architecture | | |
AIX | | |
HP-UX | | |
HP-UX IPF | | |
IRIX | | |
Linux | | |
Linux for x64 | | |
Linux on Itanium | | |
OpenVMS Alpha | | |
OpenVMS on HP Integrity | | |
Solaris | | |
Solaris for x64 | | |
Tru64 UNIX | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
When multiple REDEFINES are grouped together, the supplied sample COB2SAS program does not build the INPUT statement properly.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2011-05-10 10:13:51 |
Date Created: | 2011-02-18 11:56:28 |