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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: DFSORT Report - How to add total number of pages in header
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 Moderator


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

PostPosted: Mon Jan 16, 2006 10:44 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Tue Jan 17, 2006 10:07 pm    Post subject:
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    Post subject:
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    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 How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Detailed Transaction History report f... Kyle Carroll CICS 5 Tue Oct 18, 2016 12:42 am
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 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 Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm


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