Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sort Include command

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

New User


Joined: 07 Mar 2005
Posts: 43

PostPosted: Tue Mar 23, 2010 11:41 am    Post subject: Sort Include command
Reply with quote

//SYSIN DD *
SORT FIELDS=(start, length, type, sequence,….)
INCLUDE COND=(start, length, type,{EQ/NE/GT/GE/LT/LE},constant)
END
/*

What is the difference between both the Start and length fields. Are they denoting same start position and end position.

in an example i came across the have given.
//sysin DD *
SORT FIELDS=(1,20,CH,A)
INCLUDE COND=(28,4,CH,EQ,C'CANE')
END
/*

Both the SORT FIELDS and INCLUDE COND have different Start and Length parameters.
Back to top
View user's profile Send private message

technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Tue Mar 23, 2010 12:06 pm    Post subject:
Reply with quote

Here the programmer wants to include only character 'CANE' starting from column '28' with length 4 characters.

While you have 100 such records in the output file.. the programmer wants those records to be sorted in the ascending order for characters starting from column '1' with length 20.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Mar 23, 2010 12:13 pm    Post subject:
Reply with quote

Hi ramprabhu,

I suggest you to read Manual. Links are available on the top of this page.
Let us know if anything is not clear
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Mar 23, 2010 5:34 pm    Post subject: Re: Sort Include command
Reply with quote

prabhucs01 wrote:
What is the difference between both the Start and length fields. Are they denoting same start position and end position.

in an example i came across the have given.
Code:
//sysin DD *
  SORT FIELDS=(1,20,CH,A)
  INCLUDE COND=(28,4,CH,EQ,C'CANE')
  END
/*


Both the SORT FIELDS and INCLUDE COND have different Start and Length parameters.
Above sort-card sorts the input file on first 20 fields (bytes) of input and it includes only those records which have "CANE", of length 4-bytes, starting at position 28 in the input file.

If you are intrested to learn details of Sort-products, Please run the following job and check the //SYSOUT messages
Code:
//S1    EXEC  PGM=SORT   
//SYSOUT    DD  SYSOUT=* 
//SORTIN DD *             
RECORD                   
//SORTOUT DD DUMMY       
//SYSIN    DD    *       
  OPTION COPY             
/*     
If the messages are of type ICExxx you are using DFSort - so picking up "z/OS DFSORT: Getting Started" can be good choice; if you got messages of type WERxxxx contact Alissa to get the manuals.
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 SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us