DFSORT to reformat data



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

DFSORT to reformat data

Postby sanjana6 » Fri Mar 05, 2010 11:51 pm

Hi,

I have to convert data mentioned in section 1 to section 2 using DFSORT technique.I should remove first five lines, last dotted line and dotted columns.

Section1:
**********
Table:          CCCC
Displayed Fields:   2 of   2  Fixed Columns:                 2  List Width 0250
---------------------------------------
| |xxxxx. Channel|Name                |
---------------------------------------
| |00            |xxx Generic         |
| |01            |oooooooooooooo      |
| |02            |xxxxxxxxxxxxxxxxxxxx|
| |Q             |yyyyyyyyyyyyyyyy    |
| |Z             |zzzzzzzzzzzz        |
| |ZZ            |kkkkkkkkkkk         |
---------------------------------------

Section2:
**************
00            xxx Generic         
01            oooooooooooooo     
02            xxxxxxxxxxxxxxxxxxxx
Q             yyyyyyyyyyyyyyyy   
Z             zzzzzzzzzzzz       
ZZ            kkkkkkkkkkk 


Please advise.

Thanks,
Sanjana
sanjana6
 
Posts: 1
Joined: Tue Nov 25, 2008 12:26 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DFSORT to reformat data

 

Re: DFSORT to reformat data

Postby Frank Yaeger » Sat Mar 06, 2010 12:22 am

Here's a DFSORT job that will do what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
Table:          CCCC
Displayed Fields:   2 of   2  Fixed Columns: ...
---------------------------------------
| |xxxxx. Channel|Name                |
---------------------------------------
| |00            |xxx Generic         |
| |01            |oooooooooooooo      |
| |02            |xxxxxxxxxxxxxxxxxxxx|
| |Q             |yyyyyyyyyyyyyyyy    |
| |Z             |zzzzzzzzzzzz        |
| |ZZ            |kkkkkkkkkkk         |
---------------------------------------
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY,SKIPREC=5
  OMIT COND=(1,5,CH,EQ,C'-----')
  OUTREC BUILD=(4,14,19,20,80:X)
/*


Alternatively, you could use this DFSORT/ICETOOL job:

//S2    EXEC  PGM=ICETOOL           
//TOOLMSG DD SYSOUT=*               
//DFSMSG  DD SYSOUT=*               
//IN DD *
Table:          CCCC
Displayed Fields:   2 of   2  Fixed Columns: ...
---------------------------------------
| |xxxxx. Channel|Name                |
---------------------------------------
| |00            |xxx Generic         |
| |01            |oooooooooooooo      |
| |02            |xxxxxxxxxxxxxxxxxxxx|
| |Q             |yyyyyyyyyyyyyyyy    |
| |Z             |zzzzzzzzzzzz        |
| |ZZ            |kkkkkkkkkkk         |
---------------------------------------
//OUT DD SYSOUT=*                                                 
//TOOLIN DD *                                                     
SUBSET FROM(IN) TO(OUT) INPUT REMOVE FIRST(5) LAST USING(CTL1)   
/*
//CTL1CNTL DD *                                                   
  OUTFIL BUILD=(4,14,19,20,80:X)                                 
/*                           
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