how to sort a flat file skipping first record?

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
ShilpaA
Member
Posts: 2
Joined: Thu Sep 24, 2009 2:19 am
Location: Pune

how to sort a flat file skipping first record?

Post by ShilpaA » Tue Feb 02, 2010 9:46 pm

I want to sort a flat file let's say with 10 records but I don't want first record from sort. I tried with following sort card but got syntax error,
sort fields=(1,5,ch,a),
skiprec=01

pls help....
Shilpa

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

Post by Frank Yaeger » Tue Feb 02, 2010 9:58 pm

The correct DFSORT control statements would be:

Code: Select all

//SYSIN DD *
   SORT FIELDS=(1,5,CH,A)
   OPTION SKIPREC=1
/*
or

Code: Select all

//SYSIN DD *
  SORT FIELDS=(1,5,CH,A),   
  SKIPREC=01                
Last edited by Frank Yaeger on Mon Feb 22, 2010 11:26 pm, edited 1 time in total.
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

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