DATA Step, Macro, Functions and more

Using Modify Statement for a DB2 table with table name higher than 18 chars gives error.

Reply
Occasional Contributor
Posts: 16

Using Modify Statement for a DB2 table with table name higher than 18 chars gives error.


Hello All,

I am trying to run the below code on SAS 9.2 for Z/OS i.e mainframe  and SAS is throwing up an error.  anyway i can resolve this ?

OPTIONS ERRORABEND ;                           

LIBNAME DB2DB   DB2 SSID=DB39 SCHEMA=ADRPMMT ; 

                                               

DATA  LOADFL ;                                 

INFILE  LOADFL ;                               

  INPUT  @001  DEALER_NUMBER    $CHAR6.        

         @008  FILL_GOALX       PD3.1          

         @015  FILL_GOAL_YEAR   $CHAR04.       

         ;                                     

RUN;                                           

DATA DB2DB.DEALER_MGMT_FILL_GOAL;              

   MODIFY  DB2DB.DEALER_MGMT_FILL_GOAL         

           LOADFL ;                            

     BY DEALER_NUMBER FILL_GOAL_YEAR ;         

  FILL_GOAL = FILL_GOALX ;                    

    IF _IORC_ = %SYSRC(_SOK) THEN REPLACE ;

    ELSE IF _IORC_ = %SYSRC(_DSENMR) THEN  

      DO;                                  

          _ERROR_ = 0 ;                    

          _IORC_  = 0 ;                    

          OUTPUT ;                         

      END;                                 

RUN;                              

sas error:

ERROR: File DB2DB.DEALER_MGMT_FILL_GOAL.DATA is sequential.This task requires reading observations in a random order, but the engine allows only sequential access.

NOTE: The SAS System stopped processing this step because of errors.      

Super Contributor
Posts: 282

Re: Using Modify Statement for a DB2 table with table name higher than 18 chars gives error.

Hi,

Does the following apply:

http://support.sas.com/kb/6/720.html

If so, you might just need an extra option on the libname statement.

Regards,

Amir.

Occasional Contributor
Posts: 16

Re: Using Modify Statement for a DB2 table with table name higher than 18 chars gives error.

That did solve the issue !! Smiley Happy  thanks a lot Amir.

Senior User
Posts: 1

Re: Using Modify Statement for a DB2 table with table name higher than 18 chars gives error.

I am also facing same issue. Can you please provide me solution as SAS Support page is not available now.

SAS Employee
Posts: 1

Re: Using Modify Statement for a DB2 table with table name higher than 18 chars gives error.

it's this option for libname statement:

REREAD_EXPOSURE = YES

Ask a Question
Discussion stats
  • 4 replies
  • 759 views
  • 0 likes
  • 4 in conversation