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
 

 

How to create multiple Reports with DFSORT?

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

New User


Joined: 07 Nov 2006
Posts: 13
Location: Thiruvanathapuram

PostPosted: Wed Mar 14, 2007 4:39 pm    Post subject: How to create multiple Reports with DFSORT?
Reply with quote

Hi All,
I have a file like

Code:

003ding 067 12
001dong 123 14
002dish 123 13


I have to sort the the file with respect to 1st field and get an output report as

Code:

REPORT   page     date     time

Number      Name      E-no    Id
---------   -------   ------  ----
001         dong      123     14
002         dish      123     13
003         ding      067     12


and also sort the same w.r.t the last field and get a similar report with the heading as above.

Can you please suggest a JCL with DFSORT utility satisfying the above requirement??

Awaiting your sooner reply,

Thanking you
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Mar 14, 2007 4:47 pm    Post subject:
Reply with quote

I dont think more than one report (in your case two) can be created in single step. I feel you need two steps for your requirement.

Corrections are always welcome.
Back to top
View user's profile Send private message
youayshu
Currently Banned

New User


Joined: 07 Nov 2006
Posts: 13
Location: Thiruvanathapuram

PostPosted: Wed Mar 14, 2007 4:51 pm    Post subject: Re: How to create multiple Reports with DFSORT?
Reply with quote

Hi murmohk1,
Two steps is ok, But I need it in a single JCl. only thats the condition. Can u suggest the same?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Mar 14, 2007 4:56 pm    Post subject:
Reply with quote

Here is the code which generates report for you -


Assumed your IP and OP files are 80 in length

Code:
 

SORT FIELDS=(1,3,ch,a)        * sort number in ascending order

 OUTFIL REMOVECC,

   HEADER1=(10:C'REPORT  ',         
                  page,
                  date,
                  time),

   HEADER2=(/,                                                * insert new line
            10:C' Number Name E-no Id',                * your heading
           /,
            80C'=')



For the second report change the sort condition.

Hope this solves your problem.
Back to top
View user's profile Send private message
youayshu
Currently Banned

New User


Joined: 07 Nov 2006
Posts: 13
Location: Thiruvanathapuram

PostPosted: Wed Mar 14, 2007 5:03 pm    Post subject:
Reply with quote

Thank you

I'll try this out& let u know the result
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: Wed Mar 14, 2007 8:50 pm    Post subject:
Reply with quote

youayshu,

Here's a DFSORT/ICETOOL job that will do what you asked for in one step. If you don't want ANSI control characters (e.g. '1' for eject) in your reports, add REMOVECC to the OUTFIL statements. Note that you can change the form of the PAGE number, DATE and TIME if you need to.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN DD *
003ding 067 12
001dong 123 14
002dish 123 13
/*
//RPT1 DD SYSOUT=*
//RPT2 DD SYSOUT=*
//TOOLIN   DD    *
SORT FROM(IN) TO(RPT1) USING(CTL1)
SORT FROM(IN) TO(RPT2) USING(CTL2)
/*
//CTL1CNTL DD *
  SORT FIELDS=(1,3,ZD,A)
  OUTFIL FNAMES=RPT1,
    HEADER2=(1:'REPORT',10:PAGE=(M10,LENGTH=3),
      19:DATE,28:TIME,/,X,/,
      1:'Number',13:'Name',23:'E-no',31:'Id',/,
      1:9'-',13:7'-',23:6'-',31:4'-'),
    BUILD=(1:1,3,13:4,4,23:9,3,31:13,2,5X)
/*
//CTL2CNTL DD *
  SORT FIELDS=(13,2,ZD,A)
  OUTFIL FNAMES=RPT2,
    HEADER2=(1:'REPORT',10:PAGE=(M10,LENGTH=3),
      19:DATE,28:TIME,/,X,/,
      1:'Number',13:'Name',23:'E-no',31:'Id',/,
      1:9'-',13:7'-',23:6'-',31:4'-'),
    BUILD=(1:1,3,13:4,4,23:9,3,31:13,2,5X)
/*
Back to top
View user's profile Send private message
youayshu
Currently Banned

New User


Joined: 07 Nov 2006
Posts: 13
Location: Thiruvanathapuram

PostPosted: Thu Mar 15, 2007 1:59 pm    Post subject: Re: How to create multiple Reports with DFSORT?
Reply with quote

Thank you for ur suggestion. It worked ou correctly.....
Can you please suggest the keyword using which we can filter only the required FIELDS(not records) from the input files? I think INCLUDE is for filtering the records only, right?
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: Thu Mar 15, 2007 8:26 pm    Post subject:
Reply with quote

Quote:
Can you please suggest the keyword using which we can filter only the required FIELDS(not records) from the input files? I think INCLUDE is for filtering the records only, right?


I don't understand what you're asking. This question doesn't seem to relate to your original example. INCLUDE "filters" records based on a test of values in the fields of the records (e.g. if field1 = 5). What do you mean by "filter only the required fields"? It would help if you gave an example of what you want to do (input records and expected output records).
Back to top
View user's profile Send private message
rammraju

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Wed Mar 28, 2007 4:08 pm    Post subject: Re: How to create multiple Reports with DFSORT?
Reply with quote

I guess youayshu is referring to a column of a record when he is referring a "Field". If my guess is right SPLICE of ICETOOL should help him.

Please correct me if anything is wrong
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 Produce Mainframe Dash Board Reports ... sdcarlson53 All Other Mainframe Topics 2 Thu Jan 05, 2017 11:01 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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