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

Print blanks for unchanged control fields


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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Jan 27, 2014 5:30 am
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Jan 27, 2014 8:25 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Jan 27, 2014 8:58 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
No new posts Delete file row if blanks in the firs... DFSORT/ICETOOL 5
No new posts Help Control-R IBM Tools 2
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
Search our Forums:

Back to Top