IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DFSORT Report - How to add total number of pages in header


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mdaskal

New User


Joined: 15 Nov 2005
Posts: 5
Location: Jerusalem

PostPosted: Mon Jan 16, 2006 10:28 pm
Reply with quote

Hi,

I am looking for a way to print the total number of pages in the report on each page header using DFSORT report.
e.g. if the reports counts 25 pages, I would have on the first header page 1 of 25, on the second header page 2 of 25 and so on.

Regards, Michael.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Mon Jan 16, 2006 10:44 pm
Reply with quote

DFSORT doesn't know the total number of pages when it starts the report, so it can't put 'x of y' in the report in one pass. You'd have to use two passes to do what you want. If you want me to show you how to do it using two passes, show me the DFSORT control statements you're using, and where you want 'x of y' to appear in the report.
Back to top
View user's profile Send private message
mdaskal

New User


Joined: 15 Nov 2005
Posts: 5
Location: Jerusalem

PostPosted: Tue Jan 17, 2006 7:36 pm
Reply with quote

I would apprecite if you could show me where to add it in this statement

OUTFIL FNAMES=OUT,LINES=60,
HEADER2=(1:DATE=(4MD.),
13:TIME=(24:),
36:'POST VALIDATION REPORT AT ACCOUNT LEVEL - SUMMARY - FCFXC1R',
110:'PAGE:',PAGE,' of ',COUNT,/, 01:'SAMPLE BUILD: ',C'2005.11.10',
30:'CONVERSION VALIDATION: ',C'2005.12.01',/,
01:'BANK: 0',/,
01:130C'-',/,
18:'TARGET',41:'USED',62:' NOT',85:'NOT',/,
01:'TEST CONDITION CASE FOUND CASE CASE',
48:' CANCELLED RELEVANT MATCHED MATCHED',/,
01:'-------------- ---------- ---------- ----------',
49:'---------- ---------- ---------- ----------',/),
OUTREC=(1:PSG61_TESTCONDITION,C' ',
16:PSG61_TARGET_CASE,EDIT=('IIIIIIIIII'),C' ',
27:PSG61_FOUND_CASE,EDIT=('IIIIIIIIII'),C' ',
38:PSG61_EXISTED_CASE,EDIT=('IIIIIIIIII'),C' ',
49:PSG61_CANCELLED,EDIT=('IIIIIIIIII'),C' ',
60:PSG61_NOTRELEVANT,EDIT=('IIIIIIIIII'),C' ',
71:PSG61_MATCHED,EDIT=('IIIIIIIIII'),C' ',
82:PSG61_NOTMATCHED,EDIT=('IIIIIIIIII'),51C' ')
/*
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Jan 17, 2006 10:07 pm
Reply with quote

This turned out to be trickier than I thought, but this DFSORT/ICETOOL job will do what you asked for. You'll need the Dec, 2004 DFSORT PTF.

Code:

//STEP1 EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//SYMNAMES DD DSN=...   your symbol file
//IN DD DSN=...         input file
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//T2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//S1 DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//TOOLIN   DD    *
COPY FROM(IN) USING(CTL1)
COPY FROM(T1) USING(CTL2)
//CTL1CNTL DD *
   OUTFIL FNAMES=T1,LINES=60,
     HEADER2=(1:DATE=(4MD.),
     13:TIME=(24:),
     36:'POST VALIDATION REPORT AT ACCOUNT LEVEL - SUMMARY - FCFXC1R',
     110:'PAGE:',PAGE,' OF PGC',/,
     01:'SAMPLE BUILD: ',C'2005.11.10',
     30:'CONVERSION VALIDATION: ',C'2005.12.01',/,
     01:'BANK: 0',/,
     01:130C'-',/,
     18:'TARGET',41:'USED',62:' NOT',85:'NOT',/,
     01:'TEST CONDITION    CASE    FOUND CASE    CASE',
     48:' CANCELLED   RELEVANT   MATCHED    MATCHED',/,
     01:'-------------- ---------- ---------- ----------',
     49:'---------- ---------- ---------- ----------',/),
   OUTREC=(1:PSG61_TESTCONDITION,C' ',
          16:PSG61_TARGET_CASE,EDIT=('IIIIIIIIII'),C' ',
          27:PSG61_FOUND_CASE,EDIT=('IIIIIIIIII'),C' ',
          38:PSG61_EXISTED_CASE,EDIT=('IIIIIIIIII'),C' ',
          49:PSG61_CANCELLED,EDIT=('IIIIIIIIII'),C' ',
          60:PSG61_NOTRELEVANT,EDIT=('IIIIIIIIII'),C' ',
          71:PSG61_MATCHED,EDIT=('IIIIIIIIII'),C' ',
          82:PSG61_NOTMATCHED,EDIT=('IIIIIIIIII'),51C' '),
* Use TRAILER1 to capture page count + 1 at end of report
   TRAILER1=('PGCT',PAGE=(M11,LENGTH=3),80:X)
/*
//CTL2CNTL DD *
* Remove trailer1 from report
  OUTFIL FNAMES=T2,OMIT=(2,4,CH,EQ,C'PGCT')
* Use count + 1 to create a DFSORT Symbol as follows:
* PGCT,C'ppp'
* where ppp is the count
  OUTFIL FNAMES=S1,INCLUDE=(2,4,CH,EQ,C'PGCT'),
    OUTREC=(C'PGCT,C''',6,3,ZD,SUB,+1,M10,LENGTH=3,C'''',80:X)
/*
//STEP2 EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=&&T2,DISP=(OLD,PASS)
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
* Replace PGC with ppp in the report
  INREC IFTHEN=(WHEN=(126,3,CH,EQ,C'PGC'),OVERLAY=(126:PGCT))
/*
Back to top
View user's profile Send private message
mdaskal

New User


Joined: 15 Nov 2005
Posts: 5
Location: Jerusalem

PostPosted: Tue Jan 24, 2006 3:15 pm
Reply with quote

This worked, Thanks a lot.

Michael.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top