How can i do it using sort with overlay parameter



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

How can i do it using sort with overlay parameter

Postby Indranil28 » Fri Sep 07, 2007 3:51 pm

i have 2 files of input length 80.

first file has 09-11-2007 and second file has 03-27-2005.. In output i want the 2nd file as 03-11-2005.

How can i do it using sort with overlay parameter?
Indranil28
 
Posts: 5
Joined: Thu Sep 06, 2007 3:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How can i do it using sort with overlay parameter

 

Re: How can i do it using sort with overlay parameter

Postby CICS Guy » Fri Sep 07, 2007 6:11 pm

I'd bet that between the last example and a sort manual, you could probably work this one out on your own..... ;)
CICS Guy
 
Posts: 255
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: How can i do it using sort with overlay parameter

Postby Frank Yaeger » Fri Sep 07, 2007 9:00 pm

Indranil28,

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

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
09-11-2007
/*
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
* Create DFSORT symbol as follows:
* F1,'dd'
* where dd is the day from the file1 record
  INREC BUILD=(C'F1,''',4,2,C'''',80:X)
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD *
03-27-2005
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
* Use F1 symbol to overlay dd in the file2 record
  INREC OVERLAY=(4:F1)
/*
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
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post