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

Remove redundant data from file using JCL


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ashish.Srivastava.123

New User


Joined: 29 Jun 2014
Posts: 16
Location: India

PostPosted: Sat Sep 20, 2014 2:23 am
Reply with quote

I am comparing Reports ( in sysout ) for Testing . The 'new Report' is reformatted as explained in attachment.

The reports are viewed in TOM ( Tivoli output Manager) so first column of report tell TOM what to do with report. i.e. 1 in first column tell its a header so start from a new page. ,. for every 0 in First column in old report and there is 1 blank line placed in new report.

In New report , the code has already added extra lines as So we will not find any below data ( ' ' , 0 , - ) in new report as we have already done the formatting ( except 1)

' ' = print data
0 = 1 blank line and print data
- = 2 blank lines and then print data

Now I am comparing the file ( data in report ) and our tool is considering all the blank line also as difference. Somehow I want to remove all the extra lines and redundant rows and just keep data for comparison.

I want to remove blank lines and data like 'Run Dt: 03/27/13'.

Can you please suggest the best way to accomplish this.?

NOTE: I don't have code for program so cant use it.

Thanks
Ashishsr
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon Sep 22, 2014 3:29 pm
Reply with quote

  1. Don't attach snapshots or other files. Use BBCode and Copy/Paste your screen as text.
  2. A few words about ASA carriage control characters here.
  3. Why is this question in the DB2 forum ?
  4. You can't use JCL to process data, all you can do with JCL is execute programs.
  5. If you don't tell us which tool you use to compare the files, how do you expect us to help you ?
Back to top
View user's profile Send private message
Ashish.Srivastava.123

New User


Joined: 29 Jun 2014
Posts: 16
Location: India

PostPosted: Mon Sep 22, 2014 8:29 pm
Reply with quote

Answer to your questions:


Don't attach snapshots or other files. Use BBCode and Copy/Paste your screen as text. ( I will take care of this next time, Thanks for the information)
A few words about ASA carriage control characters here. ( I will study )
Why is this question in the DB2 forum ? ( sorry I should i have posted this in JCL forum , request moderators to move it not sure If I can)
You can't use JCL to process data, all you can do with JCL is execute programs.
If you don't tell us which tool you use to compare the files, how do you expect us to help you ? ( I use Winmerge/Windiff and SuperC on Mainframe)

Thanks
Ashish
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Sep 23, 2014 7:05 pm
Reply with quote

As you are using SuperC to compare your files, you can use process option DPBLKCL to ignore empty lines.

In the old listing, the data starts in column 2 (column 1 contains the control character).
Possibly, in the new listing, the data starts in column 1 (no control character).
If this is the case, you need to code process statement CMPCOLMN and CMPCOLMO.
If there is still an empty control character in column 1 of the new listing, use process statement CMPCOLM to start comparison at column 2.

To ignore some lines (headers with date and/or time, for example), simply use DPLINE.

Your step could look like this:
Code:
//SEARCH     EXEC PGM=ISRSUPC,                   
// PARM=('DELTAL,LINECMP,DPBLKCL,NARROW')               
//OLDDD    DD   DISP=SHR,DSN=your.old.listing
//NEWDD    DD   DISP=SHR,DSN=your.new.listing
//OUTDD    DD   SYSOUT=*                         
//SYSIN    DD   *                                 
  CMPCOLMN 1:120                                 
  CMPCOLMO 2:121                                 
  DPLINE 'RUN DT'                                 
//*

- I've used NARROW to have a side-by-side output.
- WORDCMP instead of LINECMP worked as well for me (but without NARROW).
Back to top
View user's profile Send private message
Ashish.Srivastava.123

New User


Joined: 29 Jun 2014
Posts: 16
Location: India

PostPosted: Wed Sep 24, 2014 8:24 pm
Reply with quote

Thanks Marso for all the directions.

Let me apply your suggestion and see how it goes.


Regards,
Ashishsr
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 -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts db2 vs static data COBOL Programming 1
No new posts External data queue (changes?) CLIST & REXX 0
No new posts Pull data using date difference betwe... DB2 6
No new posts fast data scrambling PL/I & Assembler 10
No new posts how to eliminate null indicator value... DB2 7
Search our Forums:

Back to Top