JCL SAS Syntax Error



Post anything related to mainframes (IBM & UNISYS) if not fit in any of the above categories

JCL SAS Syntax Error

Postby nikesh_rai » Sat Mar 16, 2013 8:15 pm

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
Thanks
Nikesh Rai
nikesh_rai
 
Posts: 205
Joined: Tue Oct 18, 2011 1:27 am
Has thanked: 17 times
Been thanked: 0 time

Re: JCL SAS Syntax Error

Postby prino » Sat Mar 16, 2013 9:48 pm

And what does this have to do with JCL?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: JCL SAS Syntax Error

Postby BillyBoyo » Sun Mar 17, 2013 1:47 am

You have an X'00' somewhere, so you need to find it, and then find out it got there.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: JCL SAS Syntax Error

Postby Robert Sample » Sun Mar 17, 2013 5:32 am

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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: JCL SAS Syntax Error

Postby nikesh_rai » Sun Mar 17, 2013 11:45 am

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.. :)
Thanks
Nikesh Rai
nikesh_rai
 
Posts: 205
Joined: Tue Oct 18, 2011 1:27 am
Has thanked: 17 times
Been thanked: 0 time


Return to All other Mainframe Topics

 


  • Related topics
    Replies
    Views
    Last post