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

How to save rejected records in SYNCSORT


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

New User


Joined: 08 Feb 2008
Posts: 82
Location: Bangalore, India

PostPosted: Fri Dec 24, 2010 12:13 am
Reply with quote

Hi,

I am trying to run a SORT card as below:
Code:
//SYSIN    DD *                                           
  SORT FIELDS=COPY                                       
  OUTFIL FILES=01,INCLUDE=((1,4,CH,EQ,C'0010),AND,       
      ((9,7,CH,EQ,C'0003391'),OR,                         
       (9,7,CH,EQ,C'0007863'),OR,                         
       (9,7,CH,EQ,C'0012119'),OR,                         
       (9,7,CH,EQ,C'0031431'),OR,                         
       (9,7,CH,EQ,C'0031875'),OR,                         
       (9,7,CH,EQ,C'0032940'),OR,                         
       (9,7,CH,EQ,C'0034043'),OR,                         
       (9,7,CH,EQ,C'0034494'),OR,                         
       (9,7,CH,EQ,C'0037631'))),BUILD=(1,43)             
  OUTFIL FILES=02,SAVE                         


I am trying to capture the records macthing above criteria in to File 01 and rest all records into 02. The above SORT card is failing with below error

WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

Can someone help what is the error here?

Thanks,
Nirmal
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: Fri Dec 24, 2010 12:46 am
Reply with quote

Hello,

Our forum SEARCH is your friend. . .

See if the post from Arun in this topic will help:
ibmmainframes.com/viewtopic.php?t=40994&highlight=copy+save
Back to top
View user's profile Send private message
kedianirmal

New User


Joined: 08 Feb 2008
Posts: 82
Location: Bangalore, India

PostPosted: Fri Dec 24, 2010 2:09 am
Reply with quote

Hi D.Sch

I tried the options in the given post but still its giving the same error message.

This is because I am putting many conditions in INCLUDE condition when I tried with just one it worked. Is there any way to give multiple condition in the INCLUDE?

Regards,
Nirmal
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Fri Dec 24, 2010 2:15 am
Reply with quote

I don't think you balanced the parentheses correctly.
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: Fri Dec 24, 2010 2:25 am
Reply with quote

Hello,

You did notice that Arun's post uses SYNCTOOL . . . And FNAMES. . .
Back to top
View user's profile Send private message
kedianirmal

New User


Joined: 08 Feb 2008
Posts: 82
Location: Bangalore, India

PostPosted: Fri Dec 24, 2010 2:29 am
Reply with quote

Hi SuperK,

Below are the two SORT card i tried:

CTL1CNTL :
OUTFIL FNAMES=OUTFIL1,
INCLUDE=(9,7,CH,EQ,C'0003391')
OUTFIL FNAMES=OUTFIL2,SAVE


CTL1CNTL :
OUTFIL FNAMES=OUTFIL1,
INCLUDE=((9,7,CH,EQ,C'0003391'),AND,
(1,4,CH,EQ,C'0010))
OUTFIL FNAMES=OUTFIL2,SAVE


The first card worked but the second not. again the same error with OUFIL.



The first
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: Fri Dec 24, 2010 4:06 am
Reply with quote

Hello,

Was something dropped at the end of the last post? Or is there just a spare/extra "The first". . . icon_smile.gif

For the second set of control info try this syntax:
Code:
  INCLUDE=(9,7,CH,EQ,C'0003391',AND,
           1,4,CH,EQ,C'0010')
corrected
I'm not where i can run a test, so this isn't tested. . .
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Sat Dec 25, 2010 12:18 pm
Reply with quote

Hello,

The problem does not seem to be with SORT/SYNCSORT. I see that you miss a closing quote(') here.
Quote:
(1,4,CH,EQ,C'0010))
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: Sun Dec 26, 2010 4:08 am
Reply with quote

Hi Arun,

Good eye icon_smile.gif

d
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Sun Dec 26, 2010 1:21 pm
Reply with quote

Thanks Dick. Have a great weekend icon_smile.gif
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: Mon Dec 27, 2010 10:09 am
Reply with quote

Thanks - i did icon_smile.gif

Just returned from a little road trip. . .

Hope you had a great weekend also icon_wink.gif

d
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Tue Dec 28, 2010 9:31 am
Reply with quote

Yes, A long weekend. I'll get back to work only by tomorrow icon_wink.gif
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 Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top