Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Parse statement error...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Tue Aug 10, 2010 4:24 pm    Post subject: Parse statement error...
Reply with quote

Hi,

I want to achieve the following requirement.

I/P: RECFM FB/133

Code:

 SCREEN NAME:APS001
 AMENDMENT CURRENTLY IN PROGRESS                                                 
 CAN NOT CHANGE UNIQUE INDEX OR KEY FIELDS                                       
 CLEAR IS INVALID 
 SCREEN NAME:APS002                                                             
 DATA DELETED                                                                   
 DATA HAS NOT BEEN COPIED                                                       
 DATA HAS NOT BEEN DELETED                                                       
 DATA HAS NOT BEEN SAVED       


O/P: RECFM FB/133

Code:
                                                 
 APS001|AMENDMENT CURRENTLY IN PROGRESS                                                 
 APS001|CAN NOT CHANGE UNIQUE INDEX OR KEY FIELDS                                       
 APS001|CLEAR IS INVALID 
 APS002|DATA DELETED                                                                   
 APS002|DATA HAS NOT BEEN COPIED                                                       
 APS002|DATA HAS NOT BEEN DELETED                                                       
 APS002|DATA HAS NOT BEEN SAVED                                                         


I tried the below code

Code:
                                                 
 SORT FIELDS=COPY                                               
 INREC IFTHEN=(WHEN=(1,12,CH,EQ,C'SCREEN NAME:'),               
 PARSE=(%1=(STARTAFT=C'NAME:',ENDBEFR=C' ',FIXLEN=6))),         
 IFTHEN=(WHEN=(1,12,CH,NE,C'SCREEN NAME:'),                     
 BUILD=(01:%1,C'|',1,80))                                           


But i am getting the following error,

Code:
                                                 
SYSIN :                                                         
  SORT FIELDS=COPY                                             
  INREC IFTHEN=(WHEN=(1,12,CH,EQ,C'SCREEN NAME:'),             
  PARSE=(%1=(STARTAFT=C'NAME:',ENDBEFR=C' ',FIXLEN=6))),       
                                                       *       
  IFTHEN=(WHEN=(1,12,CH,NE,C'SCREEN NAME:'),                   
  BUILD=(01:%1,1,80))                                           
WER268A  INREC STATEMENT   : SYNTAX ERROR                       
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                   
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                 
 


Please some one help me to resolve this. I am unable to catch the error.

Thanks
R KARTHIK
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Tue Aug 10, 2010 4:29 pm    Post subject:
Reply with quote

wild guess - remove the comma from the end of the line that begins with parse.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Aug 10, 2010 4:31 pm    Post subject: Reply to: Parse statement error...
Reply with quote

Just eyeballing it, looks to me like you have one too many close parentheses after the first PARSE.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Tue Aug 10, 2010 4:50 pm    Post subject:
Reply with quote

Another guess icon_biggrin.gif PARSE should be followed by an OVERLAY or a BUILD. You miss it in your first IFTHEN
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Tue Aug 10, 2010 5:11 pm    Post subject:
Reply with quote

And looking into your input data, it seems like you dont need a 'PARSE' application here or in other words it wont work out for you. PARSE cannot propagate fields across a 'GROUP'. If you have Syncsort for z/OS 1.3.2,you can try the below one.

Also as per your initial post, output LRECL is 133 which might not be the case as you are adding the 'screen name' - 6 byte and a '|' symbol to each record making it 140.
Code:
//SYSIN DD *
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,12,CH,EQ,C'SCREEN NAME:'),
        PUSH=(134:13,6))
  SORT FIELDS=COPY
  OUTFIL OMIT=(1,12,CH,EQ,C'SCREEN NAME:'),BUILD=(134,6,C'|',1,133)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us