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

Delete a set of records based on the flag


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
akumaras

New User


Joined: 06 Jul 2012
Posts: 10
Location: india

PostPosted: Fri Jun 21, 2013 2:40 am
Reply with quote

Hi,

I have a file with the records as below starting from column 1
Code:
BEGINXYZ123456789                     x
123455667899999089
2345556576JAFDSJAA
END                                          E
BEGINABC345RTYYYS                     x
4564779QWER080090
7867ASDJDF98U9U99
END

Here 1 record means it will be from BEGIN to END. I am setting up a flag x for the lines that starts with BEG from column 1 to column 3.
Now when ever there is flag X and E in End then i need to remove the complete record and write from next record that is next begin.

Could you please tell me how to solve this?

Code'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: Fri Jun 21, 2013 3:01 am
Reply with quote

Please use the Code tags to preserve spacing of data.

Please run this, and paste the full sysout, in the Code tags.

Code:
//LEVEL EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN DD *
CAN BE ANYTHING
/*
//SORTOUT DD DUMMY
//SYSIN   DD   *
  OPTION COPY
/*


LRECL and RECFM of you file. Position of you x and E values.
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 To fetch records that has Ttamp value... DFSORT/ICETOOL 1
No new posts ICETOOL returns no records JCL & VSAM 1
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts DELETE SPUFI DB2 1
Search our Forums:

Back to Top