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

DISPLAY. I need to suppress display of repetitive values.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Fri May 25, 2007 11:58 pm
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
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

Moderator Emeritus


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

PostPosted: Sat May 26, 2007 1:43 am
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
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
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

Moderator Emeritus


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

PostPosted: Sat May 26, 2007 4:01 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
Search our Forums:

Back to Top