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

Sections: need one appearance of certain word of section.


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

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Tue Jun 29, 2021 11:41 pm
Reply with quote

Hello, how are you people?

How can I bring a header to the outrec that appears in every page, but omitting that certain word that I was speaking in the title of this topic?

I give an example

Code:

//SYMNAMES DD  *                                               
NUMTAR,11,19,CH                                               
CUENTA-NRO,126,12,CH                                           
FORIG,43,8,CH                                                 
FPRES,84,8,CH                                                 
FDEB,110,8,CH                                                 
IMPORTE,30,13,BI                                               
IMPORTE-CTA,151,13,BI                                         
IMPORTE-CONSUMO,204,13                                         
//SYSIN    DD  *                                               
  INCLUDE COND=(8,3,SS,EQ,C'ARP,USD')                         
  INREC FIELDS=(1:8,3,                                         
     CHANGE=(7,                                               
      C'ARP',C'PESOS',                                         
      C'USD',C'DOLARES'),                                     
  8:NUMTAR,                                                   
  30:IMPORTE,                                                 
  45:IMPORTE-CTA,                                             
  60:CUENTA-NRO,                                               
  73:FORIG,                                                   
  84:FPRES,                                                   
  95:FDEB,                                                     
  105:X)                                                       
  SORT FIELDS=(1,7,CH,A,11,19,CH,A)                           
  OUTFIL FNAMES=SORTOUT,REMOVECC,LINES=56,                     
  HEADER1=(10:'REVERSAS DIARIAS, FECHA : ',FPRES, 
           36X),                                               HEADER2=(2:X,/,                                                     
         2:'my company',96X,'PAGINA:',&PAGE,5X,/,             
         2:'DESTINO: 1163',99X,'PGM: XLIST',/,                     
         2:X,/),                                                   
SECTIONS=(1,7,                                                     
 HEADER3=(3:X,/,                                                   
  3:'MONEDA:',1,7,/,X,/,                                           
  3:'CUENTA      ',17:'TARJETA',36:'F.ORIGEN',47:'F.PRESENT',       
  58:'F.DEBITO',67:'IMP.CONSUMO',84:'IMP.CUENTA',95:X,/,           
  3:'----------------------------------------------------------',   
 61:'------------------------------------'),                       
  TRAILER3=(3:'***********************************************',/, 
   3:'TOTALES: ',                                                   
   15:'IMP.CONSUMO: ',                                             
   28:TOT=(30,13,ZD,EDIT=(IIIIIII.TT)),                             
   45:'IMP.CUENTA: ',                                               
   59:TOT=(45,13,ZD,EDIT=(IIIIIII.TT)),                             
   69:' ')),                                                       
OUTREC=(3:60,12,17:8,16,36:73,8,47:84,8,58:95,8,                   
 68:30,13,ZD,EDIT=(IIIIIIT.TT),82:45,13,ZD,EDIT=(IIIIITT.TT),135:X)


this code will bring the following



Code:
mycompany
 DESTINO: 1163                                                         
                                                                       
                                                                       
                                                                       
  MONEDA:DOLARES                                                       
                                                                       
  CUENTA        TARJETA            F.ORIGEN   F.PRESENT  F.DEBITO IMP.CO
  ----------------------------------------------------------------------

xxxxxxxxxxxxxxxxxxx(data=)xxxxxxxxxxxxxxxxxxxxxxxxxxx

Code:
MONEDA:PESOS                                                         
                                                                     
CUENTA        TARJETA            F.ORIGEN   F.PRESENT  F.DEBITO IMP.CO
----------------------------------------------------------------------

xxxxxxxxxxxxxxxxxxxxx(data)xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



but the problem is that in every new page I would not have the header aboyut account, target, etc, and only the data.

If I add the part of:

Code:
CUENTA        TARJETA            F.ORIGEN   F.PRESENT  F.DEBITO IMP.CO
----------------------------------------------------------------------


in the header 3 I will be having in every page the words DOLAR/PESO and it would be sloppy, is there a way to the principal section words (PESOS/DOLAR) to appear only once and not in every page in order that I can make the HEADER 3 only with the real header, that is ------→

Code:
CUENTA        TARJETA            F.ORIGEN   F.PRESENT  F.DEBITO IMP.CO
----------------------------------------------------------------------

Coded
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Tue Jun 29, 2021 11:52 pm
Reply with quote

Please, you know how it works. We would like to see your INPUT and desired OUTPUT.
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Wed Jun 30, 2021 12:02 am
Reply with quote

Joerg.Findeisen wrote:
Please, you know how it works. We would like to see your INPUT and desired OUTPUT.



the output should be:

Code:
PAGE 1

MONEDA:DOLARES                                                       
                                                                     
CUENTA        TARJETA            F.ORIGEN   F.PRESENT  F.DEBITO IMP.CO
----------------------------------------------------------------------

DATA --data




PAGE 2

                                           
                                                                     
CUENTA        TARJETA            F.ORIGEN   F.PRESENT  F.DEBITO IMP.CO
----------------------------------------------------------------------

data data

TRAILER




PAGE 3

MONEDA: PESOS
                                         
                                                                     
CUENTA        TARJETA            F.ORIGEN   F.PRESENT  F.DEBITO IMP.CO
----------------------------------------------------------------------

DATA


PAGE 4


                                                                     
CUENTA        TARJETA            F.ORIGEN   F.PRESENT  F.DEBITO IMP.CO
----------------------------------------------------------------------


DATA

trailer: .....



Now when there is a new page its only showing the data, and i need to add the header (CUENTA TARJETA F.ORIGEN F.PRESENT F.DEBITO IMP.CO) to acompanny that data.


(the input data I manipulate it with the inrec/include as I show in the 1st comment.)

Thank you again.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Wed Jun 30, 2021 12:46 am
Reply with quote

Please review this link while you provide us sample input/output as asked.
www.ibm.com/docs/en/zos/2.2.0?topic=reports-creating-outfil
www.ibm.com/docs/en/zos/2.1.0?topic=outfil-sections
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2012
Location: USA

PostPosted: Wed Jun 30, 2021 4:24 am
Reply with quote

Ali_gezer wrote:

but the problem is that in every new page I would not have the header aboyut account, target, etc, and only the data.

Why not to include all these data listed here into your parameter HEADER2=
?????
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 PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
Search our Forums:

Back to Top