Generating a report



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

Generating a report

Postby javivi » Thu Jun 09, 2011 7:13 pm

Hi

I have the next file

aaaaaaaaaa pepe lopez 1111 00123.35
aaaaaaaaaa pepe lopez 2222 00100,12
bbbbbbbbbb luis sanche 1111 00222,34
cccccccccccc jose sanz 1111 12345.87
cccccccccccc jose sanz 2222 00345.76

And I nead to produced a report like this


PORTFOLIO NAME ACCOUNT SHARES
-------------- -------------- ------------ -------------
aaaaaaaaaa pepe lopez 1111 00123.35
2222 00100.12
bbbbbbbbbb luis sanche 1111 00222,34
cccccccccccc jose sanz 1111 12345.87
2222 00345.76

It is possible?
javivi
 
Posts: 47
Joined: Fri Jan 21, 2011 2:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Generating a report

Postby BillyBoyo » Thu Jun 09, 2011 8:33 pm

Have you tried the manuals? The "getting started" has a number of report examples.

Can you put your data in the "code" tags? (grey oblong button above the data-entry box, says "Code") This will preserve your spacing. I assume that the interchange of commas and dots is not part of the requirement, but typos?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Generating a report

Postby Frank Yaeger » Thu Jun 09, 2011 10:42 pm

javivi,

You can use a DFSORT job like the following to do what you asked for. I assumed your input was already in sorted order as shown in your example. If not, you'll need to replace OPTION COPY with a SORT statement. I wasn't sure of the positions of your fields, so I guessed. Adjust as needed.

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
aaaaaaaaaa   pepe lopez  1111 00123.35
aaaaaaaaaa   pepe lopez  2222 00100.12
bbbbbbbbbb   luis sanche 1111 00222.34
cccccccccccc jose sanz   1111 12345.87
cccccccccccc jose sanz   2222 00345.76
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  OUTREC IFOUTLEN=80,
    IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,25),PUSH=(81:SEQ=8)),
    IFTHEN=(WHEN=(81,8,ZD,GT,1),OVERLAY=(1:25X))
  OUTFIL REMOVECC,
    HEADER2=('PORTFOLIO      NAME           ACCOUNT      SHARES',/,
     '-------------- -------------- ------------ -------------'),
   BUILD=(1,13,16:14,12,31:26,4,44:31,8,80:X)
/*


SORTOUT would have:

PORTFOLIO      NAME           ACCOUNT      SHARES             
-------------- -------------- ------------ -------------       
aaaaaaaaaa     pepe lopez     1111         00123.35           
                              2222         00100.12           
bbbbbbbbbb     luis sanche    1111         00222.34           
cccccccccccc   jose sanz      1111         12345.87           
                              2222         00345.76           


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss? ... g3T7000080
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


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post