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

Query on skipping only 1 record from input file.


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

New User


Joined: 15 Nov 2006
Posts: 7

PostPosted: Wed Apr 09, 2008 11:32 pm
Reply with quote

Hi
I have some input file which can have any number of records.
The format of the file always is as follows :
Header 1 (only 1 record)
Data related to these header 1 ( Can be thousands of records)
Header 2 (only 1 record)
Data related to these header 2(Can be thousands of records)

Now my requirement is that before feeding these file as input to the next step i would need to delete the header 2(only 1 record) and use these same input file minus these header 2 in the next step.
Also in these header 2 the first 6 characters would always be 666666


Thanks
Ajay
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Apr 09, 2008 11:48 pm
Reply with quote

Harry07,

Try the following DFSORT JCL
Code:

//STEP0100 EXEC PGM=ICEMAN         
//SYSOUT   DD SYSOUT=*             
//SORTIN   DD *                     
HEADER 1                           
AAA                                 
BBB                                 
CCC                                 
DDD                                 
666666 2                           
EEE                                 
FFF                                 
GGG                                 
//SORTOUT  DD SYSOUT=*             
//SYSIN    DD *                     
  OMIT COND=(1,6,CH,EQ,C'666666')   
  SORT FIELDS=COPY                 
/*
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top