Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : programming pearls - Good judgement comes from experience, and experience comes from bad judgement.

Google
 
Web mainframegurukul.com


Visit mainframe jobs page to search mainframes jobs on top job websites.


sorting data file (keeping header and trailer on same posi.)

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities
  View previous topic :: View next topic  
Author Message
ravi10k
Member


Joined: 21 Apr 2009
Posts: 5

PostPosted: Fri Jan 29, 2010 6:46 pm    Post subject: sorting data file (keeping header and trailer on same posi.) Reply with quote

my requirement is like, I have a file below:

1.6.1.9.6Ü2. 196CIF2010028
500000000012 6196M1ACC00C
600000000007 5422239000000003
500000000013 6196M1ACC00C
600000000010 5422239000000052
500000000007 6196M1ACC00C
600000000012 5422231903255487
500000000010 6196M1ACC00C
600000000013 5422239000000078
600000000013 5422239000000078
600000000016 5408769000000007
500000000016 6196M2AGC00C
9.6.1.9.6Ü2. 196CIF0000073200


And I want the output file in sorted order on the basis on account number (position 2,length 11) and then record-type(position 1, length 1), keeping header and trailer records at the same position (i mean header on very first record and trailer on last record).

Please help.
Back to top
View user's profile Send private message

ravi10k
Member


Joined: 21 Apr 2009
Posts: 5

PostPosted: Fri Jan 29, 2010 6:49 pm    Post subject: Reply with quote

the output file would be like :

1.6.1.9.6Ü2. 196CIF2010028
500000000007 6196M1ACC00C
600000000007 5422239000000003
500000000010 6196M1ACC00C
600000000010 5422239000000052
500000000012 6196M1ACC00C
600000000012 5422231903255487
500000000013 6196M1ACC00C
600000000013 5422239000000078
600000000013 5422239000000078
500000000016 6196M2AGC00C
600000000016 5408769000000007
9.6.1.9.6Ü2. 196CIF0000073200
Back to top
View user's profile Send private message
Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 443
Location: San Jose, CA

PostPosted: Fri Jan 29, 2010 8:56 pm    Post subject: Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=...  input file
//OUT DD DSN=...  output file
//TOOLIN DD *
DATASORT FROM(IN) TO(OUT) HEADER TRAILER USING(CTL1)
/*
//CTL1CNTL DD *
  SORT FIELDS=(2,11,CH,A,1,1,CH,A)
/*

_________________
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/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ravi10k
Member


Joined: 21 Apr 2009
Posts: 5

PostPosted: Sat Jan 30, 2010 5:43 pm    Post subject: Reply with quote

Sorry Frank,
but we do not have ICETOOL installed in our system,

Could you please provide me the solution in normal DFSORT.

Thanks
Ravi
Back to top
View user's profile Send private message
Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 443
Location: San Jose, CA

PostPosted: Mon Feb 01, 2010 10:19 pm    Post subject: Reply with quote

Quote:
we do not have ICETOOL installed in our system,


That statement makes no sense. If you have DFSORT installed, then you have DFSORT's ICETOOL. ICETOOL has been shipped with DFSORT since 1991! Did you actually try the job I posted? If it didn't work, you may be downlevel in DFSORT functional PTFs. See the following:

http://www.mainframegurukul.com/ibmmainframeforums/viewtopic.php?t=3982

Quote:
Could you please provide me the solution in normal DFSORT.


I did. ICETOOL is part of DFSORT.
_________________
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/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Query For IEBPTPCH 2 padmajeet.gaikwad 687 Mon Oct 26, 2009 10:25 am
padmajeet.gaikwad View latest post
No new posts IAM BEGINNER IN JCL ...PLZ HELP ME 2 Guest 9845 Sun May 14, 2006 6:10 pm
Guest View latest post
No new posts File-Aid Help 1 Nicholas 7269 Thu Apr 13, 2006 2:12 pm
rangab View latest post
No new posts Search Batch file-aid help 6 frenchman 8071 Tue Mar 28, 2006 5:30 pm
Guest View latest post
No new posts executing java program thru JCL 1 Guest 5900 Fri Mar 17, 2006 10:14 am
arrbee View latest post
 



This widget requires Flash Player 9 or better








Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB