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

Sort Include command


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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: 1208
Location: Bangalore,India

PostPosted: Tue Mar 23, 2010 12:13 pm
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

Superior Member


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

PostPosted: Tue Mar 23, 2010 5:34 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Routing command Address SDSF to other... TSO/ISPF 2
Search our Forums:

Back to Top