problem in sort

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
Subha
Member
Posts: 13
Joined: Fri Jun 17, 2011 4:23 pm

problem in sort

Post by Subha » Thu Aug 04, 2011 4:39 pm

I have a problem in sort step of a job. Infact, the job step is successful but the output file is empty.

Any suggessions on resolution please??

here is the step i have a problem with:

Code: Select all

//S01     EXEC PGM=ICEMAN                                               
//SYSOUT  DD SYSOUT=*                                                   
//SORTIN  DD DSN=CMNTMP.CHGMAN5.LOGSTATS.OUT,DISP=SHR                   
//SORTOUT DD DSN=CMNTMP.CHGMAN5.LOGSTATS.OUT.SORTFILE,                  
//             DISP=(,CATLG,DELETE),                                    
//             SPACE=(TRK,(45,30),RLSE),UNIT=SYSDA,                     
//             DCB=(RECFM=FB,LRECL=163,BLKSIZE=16300)                   
//SYSIN   DD *                                                          
   SORT FIELDS=COPY                                                     
   INCLUDE COND=(1,21,CH,EQ,C'PKG CREATE',OR,                           
                 1,21,CH,EQ,C'CHECKED OUT',OR,                          
                 1,21,CH,EQ,C'COMPONENTS DELETED',OR,                   
                 1,21,CH,EQ,C'MEMBERS FROM PAT',OR,                     
                 1,21,CH,EQ,C'MEMBERS FROM INT',OR,                     
                 1,21,CH,EQ,C'BASELINED')                               
/* 


input file: has below and lot of other mess.

Code: Select all

DISALLOW CONCURRENT CHECKOUT - Y                                        
PACKAGE /PROMOTE /SERVICE /FT STARTED                                   
PACKAGE /PROMOTE /SERVICE /FT STARTED                                   
PACKAGE /PROMOTE /SERVICE /FT JOB B1XMQB1H (JOB12313)                   
CMN5/UAT20 COMPLETED.                                                   
PACKAGE /PROMOTE /SERVICE /FT JOB B1XMQB1H (JOB12314)                   
CMN5/UAT20 COMPLETED.                                                   
Pkg Create            7                                                 
Checked Out           415                                               
Components Deleted    158                                               
Source Staged         64                                                
Copybook Staged       0                                                 
JCL Staged            13                                                
Proc Staged           3                                                 
Members from UAT      0                                                 
Members from PAT      0                                                 
Members from INT      0                                                 
Baselined             6                                                 
READY                                                                   
END                                                                     

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Thu Aug 04, 2011 4:54 pm

Did you consider the fact that you coded for all upper-case characters, yet your data contains mixed-case characters?

Subha
Member
Posts: 13
Joined: Fri Jun 17, 2011 4:23 pm

Post by Subha » Thu Aug 04, 2011 6:35 pm

well, that should not be a problem. I used this in the past, case was never a problem.

anyway, thanks for the reply.

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Thu Aug 04, 2011 9:58 pm

Sigh. How do you expect anyone to help you when you reject the answer to your problem with a statement like "I used this in the past, case was never a problem.".

I don't know what you think you did in the past, but CASE MATTERS! DFSORT does NOT treat A (X'C1') and a (X'61') the same - they are NOT EQUAL. So your INCLUDE statement does NOT have any matches in the SORTIN records you show which is why no records are included in SORTOUT.

When I changed your SORTIN records to all uppercase, I got this in SORTOUT:

Code: Select all

PKG CREATE            7                             
CHECKED OUT           415                           
COMPONENTS DELETED    158                           
MEMBERS FROM PAT      0                             
MEMBERS FROM INT      0                             
BASELINED             6                             
So you can either use all uppercase as the input, or change the INCLUDE statement to check for case as appropriate. Alternatively, you could have DFSORT convert a copy of the fields to uppercase with INREC and TRAN=LTOU and then use OUTFIL INCLUDE with uppercase for the copied fields.

At any rate, you have to change something to get a non-empy output data set for the situation you describe.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

Subha
Member
Posts: 13
Joined: Fri Jun 17, 2011 4:23 pm

Post by Subha » Fri Aug 05, 2011 10:30 am

Frank - I did not reject his answer rather I just expressed what I thought
was right. I dont think that was a sin.

MrSpock - as I mentioned earlier, thanks a lot for ur reply to my post.
I hope u did not take me wrong like Frank did.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Fri Aug 05, 2011 1:27 pm

well, that should not be a problem. I used this in the past, case was never a problem.
It is doubtful this ever worked - not now or in the past. Post an example of where this ever did work.
Frank - I did not reject his answer rather I just expressed what I thought
was right. I dont think that was a sin.
You might not have meant to reject "his answer", but sure you did 8)
Have a good one

Subha
Member
Posts: 13
Joined: Fri Jun 17, 2011 4:23 pm

Post by Subha » Fri Aug 05, 2011 3:01 pm

MrSpock - I am extremely sorry, I was soooo wrong :cry: . I looked at my old jobs, they all worked only with correct case.

I am sorry :oops: , I was just running between multiple tasks yesterday and I overlooked at it. Please never mind.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Fri Aug 05, 2011 11:44 pm

Not to worry :)

We all get "caught up" at times :wink:
Have a good one

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others