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
 

 

How to write sort condition for this Problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sasi.palani

New User


Joined: 01 Jun 2005
Posts: 14

PostPosted: Sat Jun 11, 2005 5:34 pm    Post subject: How to write sort condition for this Problem
Reply with quote

6. Suppose I want to compare the 8 ,9 th character with 11 and 12 th character in vsam file if it is matching I should sort how to write sort condition for that
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Jun 11, 2005 8:22 pm    Post subject:
Reply with quote

If the VSAM input records can be treated as F (fixed-length), you can use a DFSORT job like this:

Code:

//F EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  VSAM input file
//SORTOUT DD DSN=...   output file
//SYSIN DD *
   RECORD TYPE=F
   INCLUDE COND=(8,2,CH,EQ,11,2,CH)
   SORT FIELDS=(p,m,f,s)
/*


If the VSAM input records must be treated as V (variable-length), you can use a DFSORT job like this (you must add 4 to the starting positions to account for the RDW DFSORT uses to process the records as variable-length):

Code:

//V EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  VSAM input file
//SORTOUT DD DSN=...   output file
//SYSIN DD *
   RECORD TYPE=V
   INCLUDE COND=(12,2,CH,EQ,15,2,CH)
   SORT FIELDS=(p+4,m,f,s)
/*


For more information on processing VSAM files as F or V with DFSORT, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/1.8.3.4?SHELF=&DT=20050222160456&CASE=
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm


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