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
 

 

Print blanks for unchanged control fields

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

New User


Joined: 24 Apr 2011
Posts: 23
Location: USA

PostPosted: Mon Jan 27, 2014 3:31 am    Post subject: Print blanks for unchanged control fields
Reply with quote

I have precisely the same need as the OP in this post (albeit with a different input file format).

Is Dick's reply above still true? I.e., have any of the new features since 2007 made it simpler to suppress repetitive data fields via the DISPLAY operator? Or are sequence numbers still the only way to go?

I know I can use the BREAK parameter on DISPLAY, but if I understand correctly, that will force a new page on each control field break. It would be much better to just suppress the printing of the data if it's identical to that of the line above (as is perfectly described in the OP's example above).

Any help would be appreciated; thank you!

David

URL'd
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7230

PostPosted: Mon Jan 27, 2014 5:30 am    Post subject: Reply to: DISPLAY. I need to suppress display of repetitive
Reply with quote

The best is to ask a new question with a link to this one.

Can you post the control cards you have for now, and a sample of your input, and wha you want the output to look like?
Back to top
View user's profile Send private message
David Sde

New User


Joined: 24 Apr 2011
Posts: 23
Location: USA

PostPosted: Mon Jan 27, 2014 7:56 pm    Post subject: Reply to: Print blanks for unchanged control fields
Reply with quote

>Can you post the control cards you have for now, and a sample of your input, and wha you want the output to look like?<

Bill,

I'm truthfully not being coy... the details in my case aren't any more interesting than those in the original thread. My column numbers and lengths differ, of course, but my issue is precisely the same. We're running DFSORT release 1.13. If I had posted the OPs question today, would the answer be any different than it was in 2007? I'm certain that if there is such a feature or technique, and if someone can give me the general idea, I can figure out the necessary control statements.

Thanks,

David
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7230

PostPosted: Mon Jan 27, 2014 8:25 pm    Post subject: Reply to: Print blanks for unchanged control fields
Reply with quote

Well, there is nothing fancy to do it that I'm aware of. Why I was asking about your cards is: the posted solution is going through the same data more than once; I'm not sure the posted solution works in all cases. If a high-order key changes but, by coincidence, a lower-order key stays the same, it is going to get blatted.

I wanted to see if what you are doing could be done with OUTFIL reporting functions (along with some code that works) if you are processing the data more than once.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7230

PostPosted: Mon Jan 27, 2014 8:58 pm    Post subject: Reply to: Print blanks for unchanged control fields
Reply with quote

I should read all the code. It probably works, but is a long way round.

I'd make a key of all the elements.

Do a restart on entire key, key minus low-order element, key minus two low-order elements until there is only one part of the key left.

Then test those sequence numbers in reverse order. No ANDs needed. No HIT=NEXT needed. Sequence equal to one, format that key for printing.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Jan 27, 2014 11:42 pm    Post subject:
Reply with quote

David sde,

I am not 100% sure as to what you are looking for , here is a sample for you
Code:

//STEP0100 EXEC PGM=SORT                                   
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD *                                             
LPAR1  DATA RECORD 1                                       
LPAR1  DATA RECORD 2                                       
LPAR3  DATA RECORD X                                       
LPAR3  DATA RECORD Y                                       
LPAR3  DATA RECORD Z                                       
//SORTOUT  DD SYSOUT=*                                     
//SYSIN    DD *                                             
  OPTION COPY                                               
  INREC IFOUTLEN=80,                                       
  IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,4,ZD,RESTART=(1,5))),
  IFTHEN=(WHEN=(81,4,ZD,GT,1),OVERLAY=(1:5X))               
//*     


The output is
Code:

LPAR1  DATA RECORD 1
       DATA RECORD 2
LPAR3  DATA RECORD X
       DATA RECORD Y
       DATA RECORD Z
Back to top
View user's profile Send private message
David Sde

New User


Joined: 24 Apr 2011
Posts: 23
Location: USA

PostPosted: Wed Jan 29, 2014 10:01 am    Post subject: Reply to: Print blanks for unchanged control fields
Reply with quote

Kolusu,

That solution is perfect; thank you so much!

David
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 Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Control-M manuals JPVRoff All Other Mainframe Topics 0 Fri May 20, 2016 11:15 am
No new posts Need Help to Define 36 Input Fields (... satish.ms10 CLIST & REXX 2 Sat May 07, 2016 3:08 pm
No new posts FileAid to compare(logical operations... anand1204 Compuware & Other Tools 3 Wed Apr 06, 2016 2:55 am


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