Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6968
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: 4650
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: 2285
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: 2285
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us