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
 

 

identifying error in sort card

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

New User


Joined: 25 Oct 2007
Posts: 80
Location: Australia

PostPosted: Sat Apr 12, 2008 3:45 pm    Post subject: identifying error in sort card
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    Post subject:
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: 80
Location: Australia

PostPosted: Sat Apr 12, 2008 6:53 pm    Post subject:
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: 205
Location: Bangalore

PostPosted: Sat Apr 12, 2008 7:02 pm    Post subject: Reply to: identifying error in sort card
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: 80
Location: Australia

PostPosted: Sat Apr 12, 2008 7:54 pm    Post subject:
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: 205
Location: Bangalore

PostPosted: Sat Apr 12, 2008 8:05 pm    Post subject: Reply to: identifying error in sort card
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: 2150
Location: At my coffee table

PostPosted: Sat Apr 12, 2008 9:14 pm    Post subject:
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: 80
Location: Australia

PostPosted: Sat Apr 12, 2008 11:53 pm    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Sun Apr 13, 2008 12:05 am    Post subject:
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

Site Director


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

PostPosted: Sun Apr 13, 2008 12:22 am    Post subject:
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: 80
Location: Australia

PostPosted: Tue May 06, 2008 12:19 am    Post subject: Reply to: identifying error in sort card
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

Site Director


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

PostPosted: Tue May 06, 2008 6:19 am    Post subject: Reply to: identifying error in sort card
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    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 Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm


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