IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ERROR WITH 'PARSE'


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
JayC

New User


Joined: 27 Sep 2008
Posts: 70

PostPosted: Thu Jan 15, 2009 12:36 pm
Reply with quote

Hi,
I am trying to use the PARSE operand , but I am getting the following error :
Code:

SYSIN :                                                           
  OPTION COPY                                                     
  OUTREC PARSE=(%01=(ENDBEFR=C',',FIXLEN=8),                       
         *                                                         
              %=(ENDBEFR=C','),                                   
              %03=(ENDBEFR=C',',FIXLEN=5),                         
              %04=(ENDBEFR=C',',FIXLEN=5),                         
              %05=(FIXLEN=8)),                                     
        BUILD=(%01,14:%03,SFF,ADD,%04,SFF,EDIT=(SIIT.T),SIGNS=(,-),
               25:%05)                                             
WER268A  OUTREC STATEMENT  : SYNTAX ERROR                         


My shop has 'SYNCSORT FOR Z/OS 1.2.3.1N' and I am calling :
Code:

//STEP01   EXEC PGM=ICEMAN


Can I use PARSE with PGM=ICEMAN ? or does SYNCSORT have a equivalent operation similar to PARSE ?
Please advice,
Thanks
Back to top
View user's profile Send private message
JayC

New User


Joined: 27 Sep 2008
Posts: 70

PostPosted: Thu Jan 15, 2009 12:48 pm
Reply with quote

Is there a way of using PARSE even though I have SYNCSORT on my shop-shouldn't there by a way for DFSORT operators to continue life on a SYNSORT shop ???
icon_sad.gif
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Jan 15, 2009 12:55 pm
Reply with quote

JayC,

SyncSort 1.3 HAS the PARSE operator. That explains why it does n't work for your version.
Quote:
Can I use PARSE with PGM=ICEMAN ?
If you have SyncSort for z/OS Release 1.3, you can use PARSE, nomatter you use PGM=ICEMAN/SORT/SYNCSORT. All these will invoke the same module.

If you explain what exactly you're trying to achieve, with a few sample input records and expected output with relevant field positions, file attributes etc. , somebody here will be able to offer suggestions.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jan 15, 2009 12:59 pm
Reply with quote

JayC wrote:
Is there a way of using PARSE even though I have SYNCSORT on my shop-shouldn't there by a way for DFSORT operators to continue life on a SYNSORT shop ???

Jayc - it is 12 minutes since you posted your first thread, so a second post will not magically cause the answer to appear.

What did you find in the SYNCSORT documentation regarding the parse function ?

And why would DFSORT functions be a part of SYNCSORT, or vise versa - they are two totally independant products developed by different companies.
Back to top
View user's profile Send private message
JayC

New User


Joined: 27 Sep 2008
Posts: 70

PostPosted: Thu Jan 15, 2009 2:20 pm
Reply with quote

Quote:
Jayc - it is 12 minutes since you posted your first thread, so a second post will not magically cause the answer to appear.


Just wante to add something to my original post. icon_smile.gif
Back to top
View user's profile Send private message
JayC

New User


Joined: 27 Sep 2008
Posts: 70

PostPosted: Thu Jan 15, 2009 2:50 pm
Reply with quote

I was trying to extract fields from each record in a file which are not in at a fixed position in the file . For example : The input is -->

Code:

ASDF ASDFS COPY SDFSGWER
ASDF COPY SDFSGWSD
ASDF COPY SDFSGWAC
COPY SDFSGWSE
SDFSSDF COPY SDFSGWSD
SDF COPY SDFSGWAR


I want to extract into the output using SORT all field the follow the word "COPY" from the about Input file.
The Output should like this :

Code:

SDFSGWER
SDFSGWSD
SDFSGWAC
SDFSGWSE
SDFSGWSD
SDFSGWAR
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Jan 15, 2009 4:21 pm
Reply with quote

What's the input LRECL?
Back to top
View user's profile Send private message
JayC

New User


Joined: 27 Sep 2008
Posts: 70

PostPosted: Thu Jan 15, 2009 4:28 pm
Reply with quote

Input LRECL=80bytes
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Jan 15, 2009 4:38 pm
Reply with quote

If the maximum possible starting position at which 'COPY' occurs is small, you could try a series of IFTHENs to check for each position.
Or else you can write a few lines of code to achieve the same which I think would be a better solution.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Jan 15, 2009 11:04 pm
Reply with quote

JayC (and others),
WER... messages indicate Syncsort
ICE... messages indicate DFSORT
regardless of the name (or alias) of the module being executed.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 15, 2009 11:41 pm
Reply with quote

Hello,

Quote:
even though I have SYNCSORT on my shop-shouldn't there by a way for DFSORT operators to continue life on a SYNSORT shop
Why would there be such? It is most important that when you use a product, you use the documentation for that product, not some product that provides similar functionality.

If you want to use PARSE, negotiate with the system support people (thru your manager) to install the current release of Syncsort.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top