Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Please Let me know if you have the DFSORT solution.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
reddy_prn

New User


Joined: 15 Feb 2007
Posts: 8
Location: India

PostPosted: Fri Feb 16, 2007 5:48 pm    Post subject: Please Let me know if you have the DFSORT solution.
Reply with quote

Please Let me know if you have the DFSORT solution for the following report creation problem.

Input File looks like as follows Except for the first row:

Code:

Region  Branch  Data
98  J2 Data1J298
98  J2 Data2J298
98  J2 Data3J398
98  L8 DATA1L898
98  L8 DATA2L898
98  U6 DataU698
12  T2 DataT212
12  D8 DataD812
13  74  Data7413
QW 45 Data45QW
QW 12 Data12Qw


I want the output report to Look like as follows :

Code:

Branch J2
1                    Data1J298
2                    Data2J298
3                    Data3J298
Total: 3
------------------------------
Branch L8
1                    Data1L898
2                    Data2L898
Total: 2
------------------------------
Branch U6
1                    DataU698
Total 1
-----------------------------
Region 98
            Branch/Region              Total
            Branch  J2                                3         
            Branch L8                                2
            Branch U6                                1         
            Region 98                                 6
----------------------------------------------------
Branch  T2       
1                    DataT212
Total 1
-----------------------------
Branch  D8
1                    DataD812
Total 1
------------------------------
Region 12         
            Branch/Region              Total
            Branch  T2                               1         
            Branch D8                                1
            Region 12                                 2
-----------------------------------------------------


In the same way, it should continue for the remaining branches and regions.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Feb 23, 2007 11:58 pm    Post subject:
Reply with quote

Hmmm ... this is a tough one. The DFSORT job below will get you the two parts of the report as two different output files, but I can't figure out how to stitch them together the way you want them. You could, of course, copy and paste.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT   DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//OUT1 DD SYSOUT=*
//OUT2 DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  OUTFIL FNAMES=OUT1,REMOVECC,
    BUILD=(SEQNUM,1,ZD,RESTART=(5,2),22:8,9),
    SECTIONS=(5,2,
      HEADER3=('Branch ',5,2),
      TRAILER3=('Total:  ',COUNT=(M11,LENGTH=1),/,
        '------------------------------'))
  OUTFIL FNAMES=OUT2,REMOVECC,NODETAIL,
    HEADER2=(13:'Branch/Region',40:'Total'),
    SECTIONS=(1,2,
       TRAILER3=(13:'Region',20:1,2,
          40:COUNT=(M10,LENGTH=5),/,
        '----------------------------------------------------'),
      5,2,
        TRAILER3=(13:'Branch',20:5,2,
          40:COUNT=(M10,LENGTH=5)))
/*
Back to top
View user's profile Send private message
reddy_prn

New User


Joined: 15 Feb 2007
Posts: 8
Location: India

PostPosted: Mon Feb 26, 2007 11:06 am    Post subject: Re: Please Let me know if you have the DFSORT solution.
Reply with quote

I wrote COBOL Program for this Problem and the problem is solved.
Thank You.
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Mon Feb 26, 2007 7:41 pm    Post subject: Re: Please Let me know if you have the DFSORT solution.
Reply with quote

Input file contains only Branch name which name and region which u mentioned or still it contain some diffrent branch or region..

Plz let me knw....

so that we can do that using JCL itself........
Back to top
View user's profile Send private message
reddy_prn

New User


Joined: 15 Feb 2007
Posts: 8
Location: India

PostPosted: Tue Feb 27, 2007 9:58 am    Post subject: Re: Please Let me know if you have the DFSORT solution.
Reply with quote

My input files is :
First 2 bytes - Region code
Next 2 bytes - Branch code
Then, Data starts for each record.
In the same region different branches can be present but vice versa is not true. There can be more than one record for each branch in the input file, but data will be different in all these records although they are from the same branch.
The input file is sorted on region and then on branch.
For every brach change, i need a report and for every region change i need a report.
Please let me know if you need additional information from me.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us