MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Report creation while two header field values are changing

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Pranabesh
Beginner


Joined: 22 Sep 2005
Posts: 11
Topics: 5
Location: WI,US

PostPosted: Thu Nov 15, 2007 12:15 pm    Post subject: Report creation while two header field values are changing Reply with quote

Hello,

I need a help in creating a report using DFSORT. Actually the report should like below :

Code:

Department : 001
Member     : A
---------------
Item       No. of distribution
1               200
2               100
3               500

Department : 001
Member     : B
---------------
Item       No. of distribution
4               500
5               100
6               500


Department : 002
Member     : C
---------------
Item       No. of distribution
7               300
8               100
9               500

Department : 003
Member     : D
---------------
Item       No. of distribution
7               300
8               100
9               500

Department : 003
Member     : E
---------------
Item       No. of distribution
7               300
8               800
9               500


I am able to get the report whenever the value of Member changes using SECTIONS in OUTFIL, but I am not getting the report accurate when the department is also changing.
So, the requirement is to report the department in the header of the report too, whose value might be changing.
It would be great if anyone could let me know how this can be acheived.

Thanks,
Pranabesh
Back to top
View user's profile Send private message
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Thu Nov 15, 2007 12:52 pm    Post subject: Reply with quote

It would probably help if you posted the sort statements that you already have.....
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu Nov 15, 2007 1:05 pm    Post subject: Reply with quote

also what you are actually getting and sample input
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Nov 15, 2007 1:10 pm    Post subject: Reply with quote

Panabesh,

Here's a DFSORT job that will do what you asked for. You didn't show what your input records look like, so I made up some input records to give you the idea. Just change the job appropriately to reflect what the input records actually look like.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
001 A 1 200
001 A 2 100
001 A 3 500
001 B 4 500
001 B 5 100
001 B 6 500
002 C 7 300
002 C 8 100
002 C 9 500
002 D 7 300
002 D 8 100
002 D 9 500
003 E 7 300
003 E 8 800
003 E 9 500
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  SORT FIELDS=(1,5,CH,A)
  OUTFIL SECTIONS=(1,5,SKIP=1L,
    HEADER3=('Department : ',1,3,/,
      'Member     : ',5,1,/,
      '---------------',/,
      'Item       No. of distribution')),
    BUILD=(7,1,17:9,3,80:X)
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Pranabesh
Beginner


Joined: 22 Sep 2005
Posts: 11
Topics: 5
Location: WI,US

PostPosted: Thu Nov 15, 2007 2:56 pm    Post subject: Reply with quote

Sorry for not posting the input file layout.Anyway, Thanks Frank..somehow you sensed what I was looking for. Your suggested solution worked fine.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Nov 15, 2007 5:13 pm    Post subject: Reply with quote

My crystal ball is working well today. 8)
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
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   printer-friendly view    MVSFORUMS.com Forum Index -> 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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group