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
 

 

Syncsort problem INCLUDE/OMIT INVALID COND

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

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Thu Nov 15, 2007 1:15 pm    Post subject: Syncsort problem INCLUDE/OMIT INVALID COND
Reply with quote

I am running a sort job as given below. But I am getting the below mentioned error. The 'WHEN' verb used is not accepted, and also some other messages are given below. The input file I am using is a VB file and converting to the FB file. The sysout is given below.

SYSIN :
SORT FIELDS=(COPY),EQUALS
INCLUDE COND=((5,5,CH,EQ,C'36308'),AND,
((45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RS'),
OR,(45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RW'),
OR,(45,5,CH,EQ,C'OHCO1',AND,207,2,CH,EQ,C'RS'),
OR,(45,5,CH,EQ,C'OHCO1',AND,207,2,CH,EQ,C'RW'),
OR,(45,5,CH,EQ,C' ',AND,207,2,CH,EQ,C'RE')))
INREC IFTHEN=(WHEN=(207,2,CH,EQ'RS'),
*
BUILD=(1:207,304,305:C'001',308:514,31,
338:C'COLUMBUS ',360:566,152)),CONVERT
WER161B ALTERNATE PARM USED
WER251A INCLUDE/OMIT INVALID COND
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE


Please let me know what is going wrong with this.
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Nov 15, 2007 1:37 pm    Post subject:
Reply with quote

Nitin,

Quote:
WER251A INCLUDE/OMIT INVALID COND


Quote:
((45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RS'),
OR,(45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RW'),


You line starts with 'or'. Please code like -

Code:
((45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RS'), OR,
(45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RW'),
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Nov 15, 2007 1:40 pm    Post subject:
Reply with quote

Nitin,

icon_redface.gif ops. Wrong suggest. Ignore my prev post.

Mods,

Could you delete my prev and this posts. Thanks. icon_biggrin.gif
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Nov 15, 2007 1:54 pm    Post subject:
Reply with quote

pjnithin
This statement should be
Code:
INREC IFTHEN=(WHEN=(207,2,CH,EQ'RS'),


Code:
INREC IFTHEN=(WHEN=(207,2,CH,EQ,C'RS'),
Back to top
View user's profile Send private message
pjnithin

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Thu Nov 15, 2007 2:06 pm    Post subject: Reply to: Sort problem INCLUDE/OMIT INVALID COND
Reply with quote

Thanks for that....
But now I am getting a different error, it is not taking the convert verb.
The message I am getting is :
SYSIN :
SORT FIELDS=(COPY),EQUALS
INCLUDE COND=((5,5,CH,EQ,C'36308'),AND,
((45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RS'),
OR,(45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RW'),
OR,(45,5,CH,EQ,C'OHCO1',AND,207,2,CH,EQ,C'RS'),
OR,(45,5,CH,EQ,C'OHCO1',AND,207,2,CH,EQ,C'RW'),
OR,(45,5,CH,EQ,C' ',AND,207,2,CH,EQ,C'RE')))
OUTREC IFTHEN=(WHEN=(207,2,CH,EQ,C'RS'),
BUILD=(1:207,304,305:C'001',308:514,31,
338:C'COLUMBUS ',360:566,152)),CONVERT
*
WER161B ALTERNATE PARM USED
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Nov 15, 2007 2:18 pm    Post subject: Reply to: Sort problem INCLUDE/OMIT INVALID COND
Reply with quote

Pjnithin,

I doubt whether CONVERT verb can be used to convert VB to FB.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Nov 15, 2007 2:27 pm    Post subject: Reply to: Sort problem INCLUDE/OMIT INVALID COND
Reply with quote

Yes, CONVERT verb can be used to convert VB to FB. Found this topic

http://ibmmainframes.com/viewtopic.php?t=24577&highlight=convert+syncsort

I guess the problem is with the SYNCSORT version as there is nothing wrong with the SORT card.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Nov 15, 2007 2:47 pm    Post subject:
Reply with quote

change your OUTREC to OUTFIL, and give a try
Back to top
View user's profile Send private message
pjnithin

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Thu Nov 15, 2007 3:23 pm    Post subject: Reply to: Sort problem INCLUDE/OMIT INVALID COND
Reply with quote

With OUTFIL i think it was working, but now gave a different error.

SYSIN :
SORT FIELDS=(COPY),EQUALS
INCLUDE COND=((5,5,CH,EQ,C'36308'),AND,
((45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RS'),
OR,(45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RW'),
OR,(45,5,CH,EQ,C'OHCO1',AND,207,2,CH,EQ,C'RS'),
OR,(45,5,CH,EQ,C'OHCO1',AND,207,2,CH,EQ,C'RW'),
OR,(45,5,CH,EQ,C' ',AND,207,2,CH,EQ,C'RE')))
OUTFIL IFTHEN=(WHEN=(207,2,CH,EQ,C'RS'),
BUILD=(1:207,304,305:C'001',308:514,30,
338:C'COLUMBUS ',360:566,152)),CONVERT
WER161B ALTERNATE PARM USED
WER276B SYSDIAG= 17316, 384029, 384029, 2727206
WER164B 12,816K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX-16K BYTES REQUESTED,
WER164B 12K BYTES RESERVE REQUESTED, 1,012K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=VB ; LRECL= 19065; BLKSIZE= 27998
WER425A CONVERT FEATURE CANNOT BE USED WITH OVERLAY OR IFTHEN
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE



It say CONVERT feature cannot be used with IFTHEN or OVERLAY.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Nov 15, 2007 3:28 pm    Post subject:
Reply with quote

change ur statement like this
Code:
OUTREC IFTHEN=(WHEN=(207,2,CH,EQ,C'RS'),
BUILD=(1:207,304,305:C'001',308:514,31,
338:C'COLUMBUS ',360:566,152))
OUTFIL CONVERT
Back to top
View user's profile Send private message
pjnithin

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Thu Nov 15, 2007 4:01 pm    Post subject: Reply to: Sort problem INCLUDE/OMIT INVALID COND
Reply with quote

Thats giving the previous error
OUTREC- SYNTAX ERROR

Anyways I am doing it in 2 steps, its working.
Thanks for your help.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Nov 15, 2007 4:04 pm    Post subject: Reply to: Sort problem INCLUDE/OMIT INVALID COND
Reply with quote

Pjnithin,

Good that it is working. Could you please post the final working JCL?
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Nov 15, 2007 4:04 pm    Post subject:
Reply with quote

Quote:
Anyways I am doing it in 2 steps, its working.
Thanks for your help.
if you could show the error message, could help you in solving the problem in single step.
Back to top
View user's profile Send private message
pjnithin

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Thu Nov 15, 2007 4:11 pm    Post subject: Reply to: Sort problem INCLUDE/OMIT INVALID COND
Reply with quote

This is the error I got.
SYSIN :
SORT FIELDS=(COPY),EQUALS
*
INCLUDE COND=((5,5,CH,EQ,C'36308'),AND,
((45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RS'),
OR,(45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RW'),
OR,(45,5,CH,EQ,C'OHCO1',AND,207,2,CH,EQ,C'RS'),
OR,(45,5,CH,EQ,C'OHCO1',AND,207,2,CH,EQ,C'RW'),
OR,(45,5,CH,EQ,C' ',AND,207,2,CH,EQ,C'RE')))
OUTREC IFTHEN=(WHEN=(207,2,CH,EQ,C'RS'),
BUILD=(1:207,304,305:C'001',308:514,30,
338:C'COLUMBUS ',360:566,152)),
*
OUTFIL CONVERT
WER161B ALTERNATE PARM USED
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE


this is the message I got.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Nov 15, 2007 4:14 pm    Post subject:
Reply with quote

in the last line
Code:
338:C'COLUMBUS ',360:566,152)),
*
you have left a comma(,) as it is....
that is your syntax error
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Nov 15, 2007 4:21 pm    Post subject:
Reply with quote

KrisPrems,

Check this.
Quote:
338:C'COLUMBUS ',360:566,152)),
*
OUTFIL CONVERT
Back to top
View user's profile Send private message
pjnithin

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Thu Nov 15, 2007 4:43 pm    Post subject: Reply to: Sort problem INCLUDE/OMIT INVALID COND
Reply with quote

Even without comma I was getting some error, thats why I tried with comma.

SYSIN :
SORT FIELDS=(COPY),EQUALS
*
INCLUDE COND=((5,5,CH,EQ,C'36308'),AND,
((45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RS'),
OR,(45,5,CH,EQ,C'OHCOG',AND,207,2,CH,EQ,C'RW'),
OR,(45,5,CH,EQ,C'OHCO1',AND,207,2,CH,EQ,C'RS'),
OR,(45,5,CH,EQ,C'OHCO1',AND,207,2,CH,EQ,C'RW'),
OR,(45,5,CH,EQ,C' ',AND,207,2,CH,EQ,C'RE')))
OUTREC IFTHEN=(WHEN=(207,2,CH,EQ,C'RS'),
BUILD=(1:207,304,305:C'001',308:514,30,
338:C'COLUMBUS ',360:566,152))
OUTFIL CONVERT
*
WER161B ALTERNATE PARM USED
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

This was what I was getting without comma, any idea whats wrong???
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Nov 15, 2007 4:46 pm    Post subject:
Reply with quote

what is the LRECL of your o/p FB file?
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Nov 15, 2007 5:18 pm    Post subject:
Reply with quote

OK, whatever is your LRECL, just replace it in the below statement
Code:
OUTFIL OUTREC=(1,LRECL),CONVERT
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 syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm


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