Create Multiline report with DFSORT



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

Create Multiline report with DFSORT

Postby igorkigork » Fri Feb 12, 2010 6:31 am

Hi,

Is there a way to create report where one input line is converted to two or multiple lines of the report?


Thank you.
igorkigork
 
Posts: 16
Joined: Thu Feb 11, 2010 9:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: multiline report.

Postby dick scherrer » Fri Feb 12, 2010 8:02 am

Hello,

Yes. Place a / in the output specification when you want to start a new output record.

I have a file of LRECL 78. Want to break every record in the file into 3 lines, each of 26 characters.

2007-08-24-09.00.00.3435762007-12-24-09.00.00.4584542007-11-29-04.38.48.187116
2007-08-24-09.00.00.1896112007-12-24-09.00.00.1258852007-11-30-02.50.00.908645

My output file should contain:
2007-08-24-09.00.00.343576
2007-12-24-09.00.00.458454
2007-11-29-04.38.48.187116
2007-08-24-09.00.00.189611
2007-12-24-09.00.00.125885
2007-11-30-02.50.00.908645


This from Frank:
//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/78)
//SORTOUT DD DSN=...  output file (FB/26)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL BUILD=(1,26,/,27,26,/,53,26)
/*
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: multiline report.

Postby igorkigork » Fri Feb 12, 2010 8:50 pm

I am sorry, my question was not correct enough,

my question was about the report with title headers etc,
not about how just to split input record.

display from list date time page -
title -
header(1) on(1) -
header(2) on(2) -
header(3) on(3)

above will produce one line of report,
is there a way to split that line something like that ?
( now SKIP is not possible ).

display from list date time page -
title -
header(1) on(1) -
header(2) on(2) SKIP -
header(3) on(3)

to produce:
---------------------------------------------------------------------------------
2010/02/10 12:00:00 TITLE -1-

header1 header2
header3
----------- ----------
1 2
3
.....
2010/02/10 12:00:00 TITLE -2-

header1 header2
header3
----------- ----------
1 2
3
igorkigork
 
Posts: 16
Joined: Thu Feb 11, 2010 9:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: multiline report.

Postby Frank Yaeger » Fri Feb 12, 2010 11:26 pm

Since you didn't use ubb code tags, I can't tell what exactly you want your report to look like, so all I can do is give you general information and a general example. If you want more specific help, show an example of your input records and what you expect the output to look like using ubb code tags so things line up correctly. Also, give the RECFM and LRECL of the input file and the starting position, length and format of each relevant field.

Here's the general info/example in case it will help:

DFSORT supports report headers and trailers (HEADER1/TRAILER1), page headers and trailers (HEADER2/TRAILER2) and section headers and trailers (HEADER3/TRAILER3 with SECTIONS). You can use the / within a header or trailer to start a new line. It looks like you want page headers so that would be HEADER2, e.g.

  ...
  OUTFIL HEADER2=(DATE=(4MD/),X,TIME,X,'TITLE',X,PAGE,/,X,/,   
     1:'header1',18:'header2',35:'header3',/,                 
     1:7'-',18:7'-',35:7'-')                                   


This would produce page headings like this:

2010/02/12 10:54:33 TITLE      1

header1          header2          header3
-------          -------          -------

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: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: multiline report.

Postby igorkigork » Tue Feb 16, 2010 10:38 pm

Frank,

i wanted to create the simple way to create the report against any flat file,
without hours and hours calculation positions in, positions out, headers, slashes etc.

my simple rexx prog runs against copybook and creates the following skeleton:
now I can quickly play what to print what filters etc. the only my problem for now is
how to do the following:

i would like FLD1, FLD2, FLD3, FLD4 are printed on the first line of report
and FLD5, FLD6, FLD7 - on the second line of the report.

//STEP01  EXEC  PGM=ICETOOL                        
//SYSPRINT  DD SYSOUT=*                            
//SYSOUT    DD SYSOUT=*                            
//TOOLMSG   DD  SYSOUT=*                          
//DFSMSG    DD  SYSOUT=*                          
//SYMNOUT   DD  SYSOUT=*                          
//IN1       DD  DISP=SHR,DSN=FILE.NAME            
//TEMP      DD  DSN=&&TEMP,                        
//  DCB=*.IN1,UNIT=SYSDA,                          
//  DISP=(,DELETE,DELETE),SPACE=(CYL,(1,1),RLSE)  
//SYMNAMES  DD  *                                  
SS-HD1,S'ANY  COMPANY'    
SS-HD2,S'ANY FILE'                                
STATUS_CODE,1,2,CH                                
SETTLE_LOCATION,3,3,CH                            
SETTLE_DESCRIPTION,6,40,CH                        
RGS0120_DESCRIP,46,15,CH                          
RGS0130_DESCRIP,61,30,CH                          
ISO_COUNTRY_CODE,91,3,CH                          
REG_AFF_AVAIL_OVER,94,1,CH  
FLD1,S'STATUS_CODE'        
FLD2,S'SETTLE_LOCATION'    
FLD3,S'SETTLE_DESCRIPTION'  
FLD4,S'RGS0120_DESCRIP'    
FLD5,S'RGS0130_DESCRIP'    
FLD6,S'ISO_COUNTRY_CODE'    
FLD7,S'REG_AFF_AVAIL_OVER'  
/*
//TOOLIN    DD  *                          
 COPY FROM(IN1) USING(CNTL)                
 DISPLAY FROM(TEMP) LIST(SYSPRINT) -      
   DATE(4MD/)  TIME TITLE(SS-HD1) PAGE   -
   TITLE(SS-HD2) TBETWEEN(20) -            
   HEADER(FLD1) ON(STATUS_CODE)   -        
   HEADER(FLD2) ON(SETTLE_LOCATION)   -    
   HEADER(FLD3) ON(SETTLE_DESCRIPTION)   -  
   HEADER(FLD4) ON(RGS0120_DESCRIP)   -    
   HEADER(FLD5) ON(RGS0130_DESCRIP)   -    
   HEADER(FLD6) ON(ISO_COUNTRY_CODE)   -    
   HEADER(FLD7) ON(REG_AFF_AVAIL_OVER)
/*
//CNTLCNTL  DD  *                
 OUTFIL FNAMES=TEMP,            
  INCLUDE=(STATUS_CODE,GT,C' ')  
/*                              
//                              


Now i would like FLD1, FLD2, FLD3, FLD4 are printed on the one line of report
and FLD5, FLD6, FLD7 - on the second line the report.
igorkigork
 
Posts: 16
Joined: Thu Feb 11, 2010 9:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: multiline report.

Postby Frank Yaeger » Tue Feb 16, 2010 11:32 pm

DISPLAY cannot split the fields across two records like that.

OUTFIL could split the fields across two records like that, but it won't figure out the spacing automatically based on the HEADER and ON lengths like DISPLAY will.

So I don't see a practical way to do what you want with DFSORT/ICETOOL.

You might be able to use DISPLAY to create the report with all of the fields on one line in a temporary data set, and then do a second pass to split each line into two. But I don't know enough about your data and desired output to say if you could do that automatically based on generated symbols.
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: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: multiline report.

Postby igorkigork » Wed Feb 17, 2010 10:19 pm

Frank,

i already did second pass to split records, just do not like that additional work.
It seems to me to implement something like a "SPLIT/SKIP" to DISPLAY DFSORT/ICETOOL
functionality is not a big deal, do you think it might be added in the future?

thank you.
igorkigork
 
Posts: 16
Joined: Thu Feb 11, 2010 9:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: multiline report.

Postby Frank Yaeger » Wed Feb 17, 2010 10:52 pm

Well, since you don't think it's a "big deal", why don't you go ahead and send me a note offline (yaeger@us.ibm.com) with the exact syntax you think should be used and the documentation for the new function. Once I understand what it is you actually want me to develop, I can consider developing it. :)
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: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: multiline report.

Postby igorkigork » Thu Feb 18, 2010 1:40 am

Thank you, Frank.

I'll send you my proposal in next couple of days.
igorkigork
 
Posts: 16
Joined: Thu Feb 11, 2010 9:56 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post