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

identifying error in sort card


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

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Sat Apr 12, 2008 3:45 pm
Reply with quote

Hi, I am not able to identify the problem here. this is not producing expected result. can someone please help ??

Code:
SYSIN :                                                                       
  SORT FIELDS=COPY                                                      0050000
  INCLUDE COND=(3,6,CH,EQ,C'REPORT',AND,3,4,CH,EQ,C'DDIN')              0051000
WER276B  SYSDIAG= 1462282, 3622001, 3622001, 5678437                           
WER164B  8,932K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER164B     0 BYTES RESERVE REQUESTED, 5,352K BYTES USED                       
WER146B  32K BYTES OF EMERGENCY SPACE ALLOCATED                               
WER108I  SORTIN   : RECFM=FB   ; LRECL=    90; BLKSIZE= 27990                 
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    90; BLKSIZE= 27990                 
WER410B  5,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,       
WER410B     0 BYTES RESERVE REQUESTED, 5,144K BYTES USED                       
WER055I  INSERT          0, DELETE       1084                                 
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
WER416B  SORTIN   : EXCP'S=1,UNIT=3390,DEV=2059,CHP=(D0D1D2D3D4D5D6D7,2),VOL=TS
WER416B  SORTOUT  : EXCP'S=0,UNIT=3390,DEV=20BC,CHP=(D0D1D2D3D4D5D6D7,2),VOL=TS
WER416B  TOTAL OF 1 EXCP'S ISSUED FOR COPYING                                 
WER054I  RCD IN       1084, OUT          0                                     
WER169I  RELEASE 1.2 BATCH 0453 TPF LEVEL 3.1                                 
WER052I  END SYNCSORT - A433863$,STEP002,,DIAG=AA00,71C0,8226,00CE,E2DA,4DCA,82
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Sat Apr 12, 2008 4:07 pm
Reply with quote

INCLUDE COND=(3,6,CH,EQ,C'REPORT',AND,3,4,CH,EQ,C'DDIN')

The conditions can not both be true, maybe that should be OR instead of AND.
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Sat Apr 12, 2008 6:53 pm
Reply with quote

Sorry Craq, it's not that. i am sure multiple and's should work. i have used it before. i even tried as you suggested now but in vain. please help.

Code:
SYSIN :                                                                       
  SORT FIELDS=COPY                                                      0050000
  INCLUDE COND=(3,6,CH,EQ,C'REPORT')                                    0051000
WER276B  SYSDIAG= 1460557, 3620152, 3620152, 5678437                           
WER164B  8,932K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER164B     0 BYTES RESERVE REQUESTED, 5,352K BYTES USED                       
WER146B  32K BYTES OF EMERGENCY SPACE ALLOCATED                               
WER108I  SORTIN   : RECFM=FB   ; LRECL=    90; BLKSIZE= 27990                 
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    90; BLKSIZE= 27990                 
WER410B  5,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,       
WER410B     0 BYTES RESERVE REQUESTED, 5,144K BYTES USED                       
WER055I  INSERT          0, DELETE       1084                                 
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
WER416B  SORTIN   : EXCP'S=1,UNIT=3390,DEV=2059,CHP=(D0D1D2D3D4D5D6D7,2),VOL=TS
WER416B  SORTOUT  : EXCP'S=0,UNIT=3390,DEV=20BC,CHP=(D0D1D2D3D4D5D6D7,2),VOL=TS
WER416B  TOTAL OF 1 EXCP'S ISSUED FOR COPYING                                 
WER054I  RCD IN       1084, OUT          0                                     
WER169I  RELEASE 1.2 BATCH 0453 TPF LEVEL 3.1                                 
WER052I  END SYNCSORT - A433863$,STEP002,,DIAG=8200,51CA,AAA8,00E6,CA56,6DC2,AA
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Sat Apr 12, 2008 7:02 pm
Reply with quote

Hi charanmsrit,

INCLUDE COND=(3,6,CH,EQ,C'REPORT',AND,3,4,CH,EQ,C'DDIN')

This condition means:

INCLUDE current record into output only if both the following two conditons become true (not one alone):
1. there is "REPORT" in column 3 to 8 in the current record
3,6,CH,EQ,C'REPORT'
2 There is 'DDIN' in column 3 to 6 in the current record.

You tell me, can the above two conditions be true together for a record?

-Ajay
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Sat Apr 12, 2008 7:54 pm
Reply with quote

Thanks but why is it not working for single condition as shown in second instance ?? INCLUDE COND=(3,6,CH,EQ,C'REPORT')

i got it now. my input has small and capital letters mixed i.e Report. now how do i make sort to avoid case sensitive condition ?? please help

Code:
000006     :                                 
000007     :Report 1                         
000008     :Copyright (C) 2007 Allen Systems
000009     ::::::::::::::::::::::::::::::::::
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Sat Apr 12, 2008 8:05 pm
Reply with quote

Whenever you are submitting your jcl:

Type on the command line:

CAPS OFF

See your jcl should not change "Report" To "REPORT" when you have submitted the jcl.


-Ajay
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Apr 12, 2008 9:14 pm
Reply with quote

charanmsrit wrote:

Code:
  INCLUDE COND=(3,6,CH,EQ,C'REPORT')
.
.
WER055I  INSERT          0, DELETE       1084                                 
.
.
WER054I  RCD IN       1084, OUT          0

OK, prove to us that there actually is a record in the input file that meets the condition.......
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Sat Apr 12, 2008 11:53 pm
Reply with quote

Thanks Ajay, It worked fine.

Hi CICS Guy, i have shown above the input which contains Report string but it has small case so was not getting desired output. Thanks it's working fine now.

000006 :
000007 :Report 1
000008 :Copyright (C) 2007 Allen Systems
000009 ::::::::::::::::::::::::::::::::::
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sun Apr 13, 2008 12:05 am
Reply with quote

Glad to hear it.....
From personal experience, I have found that when the impossible is happening, I've usually overlooked something simple......grin......
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sun Apr 13, 2008 12:22 am
Reply with quote

Hello,

What am i missing here. . . .
Quote:
INCLUDE COND=(3,6,CH,EQ,C'REPORT',AND,3,4,CH,EQ,C'DDIN')

The conditions can not both be true


Quote:
Sorry Craq, it's not that. i am sure multiple and's should work.
You may have had other problems with the code, but what Craig posted is correct (unless i'm in some strange place. . ) - NO record can ever be INCLUDEd. An equal to one literal is by definition not equal to the other (REPO can never be equal to DDIN) so the AND would fail on one side or the other.

I suspect that to get your process to run, you did more than change to lower-case for "Report".

As i mentioned in the beginning, if i'm missing something, please advise.
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Tue May 06, 2008 12:19 am
Reply with quote

That's true. i changed AND to OR as suggested. it was my fault.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue May 06, 2008 6:19 am
Reply with quote

Hello,

Quote:
it was my fault.
Not to worry - we all shoot ourselves in the foot sometimes icon_smile.gif

Thank you for posting the resloution.

d
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 Help with SORT - I need to validate d... DFSORT/ICETOOL 0
No new posts IEW2315E 1369 Link error All Other Mainframe Topics 3
No new posts Help on IMS -API URL migrating from P... IMS DB/DC 1
No new posts JCL sort to compare dates in two file... DFSORT/ICETOOL 2
No new posts Is this possible via sort (in one pass)? SYNCSORT 4
Search our Forums:

Back to Top