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
 

 

To display total Page in report trailer using SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Anil George

New User


Joined: 13 Feb 2008
Posts: 7
Location: India

PostPosted: Thu Feb 14, 2008 12:48 pm    Post subject: To display total Page in report trailer using SYNCSORT
Reply with quote

Hi all...
i need to print the total of pages in the trailer.PAGE is displayed in all pages ,now i need to display in the trailer the Total number of pages.
pls suggest ...
thanks in advance
icon_smile.gif
Back to top
View user's profile Send private message

William Thompson

Global Moderator


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

PostPosted: Thu Feb 14, 2008 3:17 pm    Post subject:
Reply with quote

Have you looked at the &PAGE parameter in the TRAILER?
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Feb 14, 2008 3:51 pm    Post subject:
Reply with quote

Are you putting the page number in every page?
How many lines make one page?
Back to top
View user's profile Send private message
Anil George

New User


Joined: 13 Feb 2008
Posts: 7
Location: India

PostPosted: Thu Feb 14, 2008 5:09 pm    Post subject:
Reply with quote

Hi,
To William:wen &PAGE is given it is displaying the subsequent page number.I need the same total page ie, the last page number shuould be displayed.

TO Krisprems: ya page number is shown in all pages.
der are 24 lines in one page.

Thanks and regards,
Anil
Back to top
View user's profile Send private message
Anil George

New User


Joined: 13 Feb 2008
Posts: 7
Location: India

PostPosted: Thu Feb 14, 2008 7:59 pm    Post subject: Detailed description
Reply with quote

I have given &PAGE=(LENGTH=6) to display the page number in all the pages. However the requirement is to add the total number of pages in the report trailer for which I have used TRAILER1 parameter. But the issue is that when I give &PAGE in the trailer its displaying the next value of the last page. Ie if the last page is 13 in the trailer it should display as “Total number of pages is 223” but the display is coming as 224 which is wrong. Is there any way I can decrement the value.
Sample Input

Quote:

101198777 03/05/08 PXXXXX 1100.00 S 121042882

101198777 03/05/08 PXXXXX 1100.00 S 121042882

101198777 03/05/08 PXXXXX 1100.00 S 121042882



Sample output
Quote:

1011987 03/05/08 P1878 03/05/08 P1878 03/05/08 P1878

1011987 03/05/08 P1878 03/05/08 P1878 03/05/08 P1878

TOTAL NO OF MISMATCHES: 10020 224


code
Quote:

SORT FIELDS=(1,9,CH,A)

OUTFIL FILES=OUT,

LINES=50,

HEADER2=('DATE:',&DATE=(DM4/),12X,'XXXXXXXXXXXXXXXXXXXXXXXX',13X,

1/1:'REPORT ID:',17X,' XXXXXXXXXXXXXXXXXXXXXXXX,

2/1:'ACCOUNT NO',2X,'XXXX FILE',10X,'XXXX FILE',10X,

'XXXXXXX,10X,'REASON',24X,'PAGE:',

&PAGE=(FS,LENGTH=3),/),

OUTREC=(1:1,9,13:13,16,31:13,16,49:13,16,68X),

TRAILER1=(5:'TOTAL NO OF MISMATCHES:',X,COUNT,5X,&PAGE=(FS,LENGTH=3))
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Feb 14, 2008 8:13 pm    Post subject:
Reply with quote

This sample SORT JCL is for an i/p or o/p file of LRECL=50,RECFM=FB
Code:
//*******************************************************
//STEP1    EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD *                                         
QWE                                                     
QWE                                                     
QWE                                                     
QWE                                                     
QWE                                                     
QWE                                                     
QWE                                                     
QWE                                                     
QWE                                                     
QWE                                                     
QWE                                                     
QWE                                                     
QWE                                                     
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
QWE
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                       
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(60:SEQNUM,8,ZD,                   
        68:(60,8,ZD,MOD,+2),ADD,(60,8,ZD,MOD,+23),EDIT=(TT),         
                 70:(60,8,ZD,DIV,+23),EDIT=(TTT))),                   
  IFTHEN=(WHEN=(68,2,ZD,NE,+0),OVERLAY=(70:70,3,ZD,ADD,+1,EDIT=(TTT)))
  SORT FIELDS=COPY                                                   
 OUTFIL LINES=24,TRAILER2=(C'PAGE#',&PAGE),                           
 TRAILER1=('TOT# PAGES',70,3),                                       
 BUILD=(1,50)                                                         
/*                                                                   

Try this and modify as per your requirement.
Any prob persists..just revert!!
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm


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