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

Removing date values lines/records from a file


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
selvamsrinivasan85

New User


Joined: 09 Aug 2010
Posts: 17
Location: Coimbatore

PostPosted: Sat Dec 04, 2021 12:56 pm
Reply with quote

Hi all,
I am having a file that contains a XML extract. I need to read the file and remove the date value records. Main condition is I have to keep the first date value record and remove the following date value records.

Sample records in file:

Line1
Line2
Line3
Date1
Date2
Line 1
Line 2
Line 3
Line 4
Line 5
Date 1
Date 2
Date 3
Date 4

As you see, Date value and line records can be of any record. I need to keep the Date 1 record alone and need to remove date 2, date3 and date4.

Output:
Line1
Line2
Line3
Date1
Line 1
Line 2
Line 3
Line 4
Line 5
Date 1

Date values also not consistent. Can someone throw light on this?. I will pick it up.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 1527

PostPosted: Sat Dec 04, 2021 2:15 pm
Reply with quote

Where is XML?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2901
Location: NYC,USA

PostPosted: Sat Dec 04, 2021 6:11 pm
Reply with quote

It’s not clear at all what you explained , but based on what you say you better off writing the COBOL program quickly.
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts vsam file access JCL & VSAM 11
No new posts To Remove spaces (which is in hex for... JCL & VSAM 10
No new posts JCL - To repeat a string in same colu... JCL & VSAM 2
No new posts How can I select certain file dependi... JCL & VSAM 12
This topic is locked: you cannot edit posts or make replies. How can I select certain file dependi... Compuware & Other Tools 1
Search our Forums:

Back to Top