Page 1 of 1

JCL SAS Syntax Error

PostPosted: Sat Mar 16, 2013 8:15 pm
by nikesh_rai
Hi,

I have a JCL which is calling SAS.. and its giving Syntax Error.. Please suggest me..

STEP03   EXEC SAS                                             
SAS.WORK DD  UNIT=(SYSDA,59),SPACE=(CYL,(2500,2500)),         
             DCB=(RECFM=FB,LRECL=904,BLKSIZE=0,DSORG=PS)     
INFL01   DD DSN=TEST.N001,         
            DISP=SHR                                         
RESULT0  DD DSN=TEST.N001.FMT,     
         DISP=(,CATLG,DELETE),                               
         UNIT=(FLXSHR,59),                                   
         SPACE=(CYL,(100,100),RLSE),                         
         DCB=(RECFM=FB,LRECL=130)                             
SYSPRINT DD  SYSOUT=*                                                 
SYSIN    DD  DISP=SHR,DSN=TEST.LAYOUT.FMTD4         
         DD  DISP=SHR,DSN=TEST.LAYOUT.FMTD2   


TEST.LAYOUT.FMTD4:

DATA IN01 ;                                               
                                                         
INFILE INFL01  LENGTH=RECLEN;                             
INPUT @01  NIKESH                                   
     @1        WXXX-HXXX-DXX-PX-IX                  PD6. 
     @7        WXXX-HXXX-PX-IX                      PD6. 
     @13       WXXX-BXXX-EXXX-CXX-CX                $1.   
     @14       WXXX-PXXX-BXXX-IX                    $8.   


TEST.LAYOUT.FMTD2:

DATA _NULL_;                                                   
SET IN01;                                                       
FILE RESULT0;                                                   
PUT  @1        WXXX-HXXX-DXX-PX-IX                          10.
     @7        WXXX-HXXX-PX-IX                              10.
     @13       WXXX-BXXX-EXXX-CXX-CX                        $1 
     @14       WXXX-PXXX-BXXX-IX                            $8 



Sysout is coming as

1          DATA IN01 ;                                                         
2                                                                               
3          INFILE INFL01  LENGTH=RECLEN;                                       
4          INPUT @01  ELGBLBIT_REC                                             
WARNING: A line of input contains one or more null (hexadecimal 00) characters, which may cause the SAS System to ignore part of
         the line.  The line, with null characters printed as question marks, is
     @1        WC38-HIER-DOC-PT-ID                  PD6.                       
5               @1        WC38-HIER-DOC-PT-ID                  PD6.             
                                   _                                           
                                   _                                           
                                   _                                           
                                   22                                           
                                   22                                           
                                   22                                           
                                   76                                           
                                   76                                           
                                   76                                           
WARNING: A line of input contains one or more null (hexadecimal 00) characters, which may cause the SAS System to ignore part of
2                                                          The SAS System       
         the line.  The line, with null characters printed as question marks, is
     @7        WC38-HIER-PT-ID                      PD6.                       
ERROR 22-322: Syntax error, expecting one of the following: Ý, {.               
ERROR 22-322: Syntax error, expecting one of the following: Ý, {.               
ERROR 22-322: Syntax error, expecting one of the following: Ý, {.               
                                                                               
ERROR 76-322: Syntax error, statement will be ignored.                         
ERROR 76-322: Syntax error, statement will be ignored.                         
ERROR 76-322: Syntax error, statement will be ignored.



Thanks
Nikesh

Re: JCL SAS Syntax Error

PostPosted: Sat Mar 16, 2013 9:48 pm
by prino
And what does this have to do with JCL?

Re: JCL SAS Syntax Error

PostPosted: Sun Mar 17, 2013 1:47 am
by BillyBoyo
You have an X'00' somewhere, so you need to find it, and then find out it got there.

Re: JCL SAS Syntax Error

PostPosted: Sun Mar 17, 2013 5:32 am
by Robert Sample
Since the input file you posted:
DATA IN01 ;                                               
                                                         
INFILE INFL01  LENGTH=RECLEN;                             
INPUT @01  NIKESH             
does not match the SAS input file:
1          DATA IN01 ;                                                         
2                                                                               
3          INFILE INFL01  LENGTH=RECLEN;                                       
4          INPUT @01  ELGBLBIT_REC                                             
WARNING: A line of input contains one or more null (hexadecimal 00) characters,
either NIKESH is being changed by some process before the job executes (in which case you need to find out what is changing it and fixing the hex '00' characters being generated), or NIKESH is a SAS macro (in which case you need to find the macro source code and fix the hex '00' characters being generated). Either way, the source is at your site and you will have to find and fix the problem since we don't have access to it on this forum.

Re: JCL SAS Syntax Error

PostPosted: Sun Mar 17, 2013 11:45 am
by nikesh_rai
got the issue.. actually I was using hyphen ' - ' in field names, but special characters are not allowed in field names defined for SAS except underscore '_' , I just changed all the '-' with '_' and its working now..

Thanks Robert, Billy and Prins.. :)