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
 

 

Remove redundant data from file using JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
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    Post subject: Remove redundant data from file using JCL
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: 1218
Location: Israel

PostPosted: Mon Sep 22, 2014 3:29 pm    Post subject: Reply to: Remove redundant data from file using JCL
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    Post subject: Reply to: Remove redundant data from file using JCL
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: 1218
Location: Israel

PostPosted: Tue Sep 23, 2014 7:05 pm    Post subject:
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    Post subject: Reply to: Remove redundant data from file using JCL
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    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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