| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
sasi.palani
Joined: 01 Jun 2005
Posts: 14
|
| Posted: Sat Jun 11, 2005 5:34 pm Post subject: How to write sort condition for this Problem |
|
|
| 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 |
|
Frank Yaeger
Joined: 15 Feb 2005
Posts: 4607
Location: San Jose, CA
|
| Posted: Sat Jun 11, 2005 8:22 pm Post subject: |
|
|
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 |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|