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
 

 

DISPLAY. I need to suppress display of repetitive values.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Jeanne Kornkven

New User


Joined: 25 May 2007
Posts: 4
Location: Milwaukee, WI

PostPosted: Fri May 25, 2007 10:56 pm    Post subject: DISPLAY. I need to suppress display of repetitive values.
Reply with quote

My output needs to be reformatted. It looks like this:

Code:
 DEPT   CLASS   VENDOR       SKU             TYPE            RETAIL              COST              UNITS
 ----   -----   ----------   -------------   ----   ---------------   ---------------   ----------------
 0014   002     0140099997   9999999999999   M002              8.99              0.00                  0
 0016   002     0160099997   9999999999999   I002              0.11              0.00                  0
 0016   628     0160099997   9999999999999   I002              0.15              0.00                  0
 0016   002     0160099997   9999999999999   M041              1.50              0.00                  0
 0016   628     0160099997   9999999999999   M041              1.95              0.00                  0
 0016   002     0160099997   9999999999999   S001              8.49              0.00                  1
 0016   628     0160099997   9999999999999   S001             11.04              0.00                  1
 0016   002     0160099997   9999999999999   S004              8.49              0.00                  1
 0016   628     0160099997   9999999999999   S004             11.04              0.00                  1


I need it to look like this:

Code:
SIF_DPT  SIF_CLS  VEND        SKU            SIF_TYPE         SIF_RETAIL           SIF_COST  SIF_UNITS 
-------  -------  ----        ---            --------         ----------           --------  --------- 
0014     002      0140099997  9999999999999  M002                   8.99                .00          0 
0016     002      0160099997  9999999999999  I002                    .11                .00          0 
                                             M041                   1.50                .00          0 
                                             S001                   8.49                .00          1 
                                             S004                   8.49                .00          1 
         628      0160099997  9999999999999  I002                    .15                .00          0 
                                             M041                   1.95                .00          0 
                                             S001                  11.04                .00          1 
                                             S004                  11.04                .00          1 


In other words, only print the dept, cls, vend, and sku fields when they change.

Code:
 COUNT FROM(OUT1) EMPTY RC4                                                 
 DISPLAY FROM(OUT1) LIST(OFFLINE) -                                         
         TITLE('VA DEPT/VEND NOT IN WALKER FILE (TRMS=VAVNDEXC)') -         
                DATE TIME PAGE -                                           
         HEADER('DEPT')       ON(28,04,CH) -                               
         HEADER('CLASS')      ON(32,03,CH) -                               
         HEADER('VENDOR')     ON(55,10,CH) -                               
         HEADER('SKU')        ON(72,13,CH) -                               
         HEADER('TYPE')       ON(1,4,CH) -                                 
         HEADER('RETAIL')     ON(99,6,PD,C1,N10) -                         
         HEADER('COST')       ON(105,6,PD,C1,N08) -                         
         HEADER('UNITS')      ON(111,4,BI,A0) -                             
         BREAK(25,03,CH)      BTITLE('COMPANY') -                           
         STATLEFT -                                                         
         TOTAL('TOTAL')                                                     
*                                                                           


The code above is what I am using. Do I need to implement SEQNUMs for each field and overlay with spaces in an IFTHEN?? Am I on the right track?

Thanks for your help.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 25, 2007 11:58 pm    Post subject:
Reply with quote

Hello and welcome to the forums icon_smile.gif

How is the data that needs to be reformatted created initially?
Back to top
View user's profile Send private message
Jeanne Kornkven

New User


Joined: 25 May 2007
Posts: 4
Location: Milwaukee, WI

PostPosted: Sat May 26, 2007 1:19 am    Post subject:
Reply with quote

This is a sequential file of records that are rejected by a COBOL program. I just need to format the rejected records so the user can make sense of them.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat May 26, 2007 1:43 am    Post subject:
Reply with quote

Hello,

Is it possible that the rejects could be put into a data file without the headers and editing?

From your example, not only is some suppression wanted, but the data is now in a different sequence. Originally, the 002 and 628 entries are interleaved, but in the desired output, theu are placed together.

I believe this "data" file would be easier to use for the report generation you want.
Back to top
View user's profile Send private message
Jeanne Kornkven

New User


Joined: 25 May 2007
Posts: 4
Location: Milwaukee, WI

PostPosted: Sat May 26, 2007 2:03 am    Post subject:
Reply with quote

I need to clarify: the first example is my output. The second is my desired output. The input is, indeed in data file. I'll need a sort.

    M00205/23/200705/23/2007005001400200000000000000000000014009999799999999999999999999015305/23/2007....i?..........
    I00205/23/200705/23/2007005001600200000000000000000000016009999799999999999999999999044005/23/2007................
    I00205/23/200705/23/2007005001662800000000000000000000016009999799999999999999999999043705/23/2007.....*..........
    M04105/23/200705/23/2007005001600200000000000000000000016009999799999999999999999999044005/23/2007................
    M04105/23/200705/23/2007005001662800000000000000000000016009999799999999999999999999043705/23/2007.....*..........
    S00105/23/200705/23/2007005001600200000000000000000000016009999799999999999999999999044005/23/2007....d?..........
    S00105/23/200705/23/2007005001662800000000000000000000016009999799999999999999999999043705/23/2007.....<..........
    S00405/23/200705/23/2007005001600200000000000000000000016009999799999999999999999999044005/23/2007....d?..........
    S00405/23/200705/23/2007005001662800000000000000000000016009999799999999999999999999043705/23/2007.....<..........
Back to top
View user's profile Send private message
Jeanne Kornkven

New User


Joined: 25 May 2007
Posts: 4
Location: Milwaukee, WI

PostPosted: Sat May 26, 2007 3:20 am    Post subject: Re: DISPLAY. I need to suppress display of repetitive value
Reply with quote

I have it working. This does seem like the long way around, however, is there a simpler method? I was hoping for something simpler.
Code:
//CTL1CNTL DD *                                                 
  SORT FIELDS=(25,03,CH,A,                                       
               28,04,CH,A,                                       
               32,03,CH,A,                                       
               55,10,CH,A,                                       
               72,13,CH,A,                                       
               1,4,CH,A)                                         
  OUTREC IFTHEN=(WHEN=INIT,BUILD=(01,114,                       
                      115:SEQNUM,4,ZD,RESTART=(28,04),           
                      119:SEQNUM,4,ZD,RESTART=(32,03),           
                      123:SEQNUM,4,ZD,RESTART=(55,10),           
                      127:SEQNUM,4,ZD,RESTART=(72,13))),         
         IFTHEN=(WHEN=(115,04,CH,NE,C'0001'),OVERLAY=(28:4X),HIT=NEXT),
         IFTHEN=(WHEN=(119,04,CH,NE,C'0001',AND,                       
                      115,04,CH,NE,C'0001'),OVERLAY=(32:4X),HIT=NEXT), 
         IFTHEN=(WHEN=(123,04,CH,NE,C'0001',AND,                       
                      119,04,CH,NE,C'0001',AND,                         
                      115,04,CH,NE,C'0001'),OVERLAY=(55:10X),HIT=NEXT),
         IFTHEN=(WHEN=(127,04,CH,NE,C'0001',AND,                       
                      123,04,CH,NE,C'0001',AND,                         
                      119,04,CH,NE,C'0001',AND,                         
                      115,04,CH,NE,C'0001'),OVERLAY=(72:13X),HIT=NEXT) 
  OUTFIL  FNAMES=OUT1,BUILD=(01,114)                                   
/*                                                                     
//*                                                                     
//TOOLIN   DD *                                                         
  SORT  FROM(VASIF) TO(OUT1) USING(CTL1)                               
  COUNT FROM(OUT1) EMPTY RC4                                           
  DISPLAY FROM(OUT1) LIST(RPT1) -                                       
          TITLE('VA DEPT/VEND NOT IN WALKER FILE (TRMS=VAVNDEXC)') -   
                 DATE TIME PAGE -                                       
          HEADER('DEPT')       ON(28,04,CH) -                           
          HEADER('CLASS')      ON(32,03,CH) -                           
          HEADER('VENDOR')     ON(55,10,CH) -                           
          HEADER('SKU')        ON(72,13,CH) -           
          HEADER('TYPE')       ON(1,4,CH) -             
          HEADER('RETAIL')     ON(99,6,PD,C1,N10) -     
          HEADER('COST')       ON(105,6,PD,C1,N08) -   
          HEADER('UNITS')      ON(111,4,BI,A0) -       
          BREAK(25,03,CH)      BTITLE('COMPANY') -     
          STATLEFT -                                   
          TOTAL('TOTAL')                               
/*                                                     


Thanks,
Jeanne
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat May 26, 2007 4:01 am    Post subject:
Reply with quote

Hello,

Good to hear that it is working icon_smile.gif

Your solution may be the "simple" way with DFSORT. . . .
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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm


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