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 generate a report with DFSORT

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

New User


Joined: 06 Mar 2006
Posts: 19

PostPosted: Tue Feb 27, 2007 6:07 am    Post subject: How to generate a report with DFSORT
Reply with quote

Hi All icon_smile.gif ,

I have two input files of LRECL=80 with data as below.

Input File 1: The value of fourth column 'P indicates Production'

AAAP
BBBP
CCCP
DDDP

Input File 2: The value of fourth column 'T indicates Test'

AAAT
BBBT
CCCT

I would like to have two output files as below.

Output File 1: This file should have report as below.

******************************************
There are 4 production and 3 test records found.

A) Production records:

AAAP
BBBP
CCCP
DDDP


B) Test records:

AAAT
BBBT
CCCT

******************************************

Output File 2:

This file need to have a copy of all records from Input Files 1 & 2 and with LRECL=132 (First 80 bytes of data remaining 52 with spaces)


Is is possible to acheive the above in single step with DFSORT/ICETOOL?

Thanks in Advance

Regards,
Ramanan R
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Feb 27, 2007 7:11 am    Post subject:
Reply with quote

Ramanan ,

Correct me if I am wrong, but it seems that you are asking for the two input files to be merged producing two output files.

The first output file (a printed report?) will contain all the production records from file 1 and all the test records from file 2 with an lrecl of 80.

The second output file (another printed report?) will contain all the production records from file 1 and all the test records from file 2 with an lrecl of 132; 80 bytes of the input date and 52 bytes of blank padding.

Do you want them sorted or reordered in any way?

What sort and format of headers and trailers are you expecting?

Any sub-totals or grouping?

Bill
Back to top
View user's profile Send private message
Redrose
Currently Banned

New User


Joined: 06 Mar 2006
Posts: 19

PostPosted: Tue Feb 27, 2007 7:27 am    Post subject:
Reply with quote

William,

Thanks for your reply.

Exactly the same, i want the two input files to be merged.

No need of sorting/reordering or sub-totals of records.

As mentioned in my previous post, i want the Output file 1 with data exactly within two lines of asterik lines and the second one with exactly the same way as you described.

Thanks once again,
Ramanan R
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Feb 27, 2007 7:45 am    Post subject:
Reply with quote

Ramanan

Redrose wrote:
As mentioned in my previous post, i want the Output file 1 with data exactly within two lines of asterik lines and the second one with exactly the same way as you described.
Since I described both output files exactly the same (except for the lrecl), are you saying that, except for the lrecl, both outputs will look exactly the same?
No headers, no trailers, no "lines of asterik", right?

One more thing, do you want the contents of file 1 just followed by the contents of file 2, as in just concatenate and copy?

Bill
Back to top
View user's profile Send private message
Redrose
Currently Banned

New User


Joined: 06 Mar 2006
Posts: 19

PostPosted: Tue Feb 27, 2007 8:23 am    Post subject:
Reply with quote

William,

Sorry for the confusion.

The Output file 1 should have the data as in code window as below.
with headers and records from both Input 1 & 2.

Code:
There are 4 production and 3 test records found.

A) Production records:

AAAP
BBBP
CCCP
DDDP


B) Test records:

AAAT
BBBT
CCCT


The Output file 2 should have merged records from input 1 & 2 but with LRECL=132.

Thanks,
Ramanan R
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: Tue Feb 27, 2007 9:53 pm    Post subject:
Reply with quote

Ramanan R,

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN  DD DSN=...  input file1 (FB/80)
//        DD DSN=...  input file2 (FB/80)
//SYMP DD DSN=&&SP,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYMT DD DSN=&&ST,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL FNAMES=SYMP,REMOVECC,NODETAIL,
    INCLUDE=(4,1,CH,EQ,C'P'),
    TRAILER1=(C'P_CT,''',COUNT=(EDIT=(T)),C'''')
  OUTFIL FNAMES=SYMT,REMOVECC,NODETAIL,
    INCLUDE=(4,1,CH,EQ,C'T'),
    TRAILER1=(C'T_CT,''',COUNT=(EDIT=(T)),C'''')
/*
//S2    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//SYMNAMES DD DSN=&&SP,DISP=(OLD,PASS)
//         DD DSN=&&ST,DISP=(OLD,PASS)
//INP  DD DSN=...  input file1 (FB/80)
//INT  DD DSN=...  input file2 (FB/80)
//RPT1 DD DISP=MOD,DSN=...  output file1
//RPT2 DD DISP=MOD,DSN=...  output file2
//TOOLIN   DD    *
COPY FROM(INP) USING(CTL1)
COPY FROM(INT) USING(CTL2)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=RPT1,REMOVECC,
    HEADER1=('There are ',P_CT,' production and ',T_CT,
      ' test records found.',/,X,/,
      'A) Production records:',/)
  OUTFIL FNAMES=RPT2,OVERLAY=(132:X)
/*
//CTL2CNTL DD *
  OUTFIL FNAMES=RPT1,REMOVECC,
    HEADER1=(/,X,/,'B) Test records:',/)
  OUTFIL FNAMES=RPT2,OVERLAY=(132:X)
/*
Back to top
View user's profile Send private message
Redrose
Currently Banned

New User


Joined: 06 Mar 2006
Posts: 19

PostPosted: Wed Feb 28, 2007 3:54 am    Post subject:
Reply with quote

Frank,

Thanks for your help

Regards,
Ramanan R
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 Splitting of single report to seperat... abdulrafi TSO/ISPF 4 Mon Mar 27, 2017 3:59 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Easytrieve report shalem CA Products 4 Sun Feb 26, 2017 9:08 am
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am


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