View previous topic :: View next topic
Author
Message
mdaskal New User Joined: 15 Nov 2005Posts: 5 Location: Jerusalem
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
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
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
mdaskal New User Joined: 15 Nov 2005Posts: 5 Location: Jerusalem
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
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
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
mdaskal New User Joined: 15 Nov 2005Posts: 5 Location: Jerusalem
This worked, Thanks a lot.
Michael.
Back to top
Please enable JavaScript!