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
 

 

skip header records from input file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
dilpreet

New User


Joined: 18 Mar 2008
Posts: 34
Location: INDIA

PostPosted: Thu Mar 27, 2014 9:07 pm    Post subject: skip header records from input file
Reply with quote

I have a sequential file from which I want to remove the header rows until I find a row with "MEMBER' . Is it anyways possible through sort or Icetool

Input file data :

Code:
 READY
   LISTDS 'C8AYPE.LOADLIB.C82PROD.ANNO' MEMBERS
 C8AYPE.LOADLIB.C82PROD.ANNO
 --RECFM-LRECL-BLKSIZE-DSORG
   U     **    13030   PO

 --VOLUMES--
   M93855
 --MEMBERS--                              --> want to skip records till here
   ALCICWI6
   ALCICWI7


Code'd
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Mar 27, 2014 9:16 pm    Post subject: Reply to: skip header records from input file
Reply with quote

Use IFTHEN=(WHEN=GROUP with BEGIN for "--MEMBERS--" and PUSH a character to an extension of the record.

In OUTFIL, use OMIT=/INLCUDE= to ignore/select your records, and BUILD to drop off the extension.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Thu Mar 27, 2014 9:59 pm    Post subject:
Reply with quote

Instead of a sort step you can skip records in REXX in OUTTRAP while writing to output and thus you would retain only the member names.

Or In sort as the output is not going to change you could just SKIP the first 9 records
Back to top
View user's profile Send private message
dilpreet

New User


Joined: 18 Mar 2008
Posts: 34
Location: INDIA

PostPosted: Fri Mar 28, 2014 12:54 am    Post subject: Reply to: skip header records from input file
Reply with quote

@Bill
I am not familiar with the syntax . Could you please elaborate more on how Rows after '--Member' can be included in the final file .

Thanks
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Fri Mar 28, 2014 4:24 am    Post subject:
Reply with quote

Dilpreet,

Look at below thread, that would explain Bill's approach.

http://ibmmainframes.com/about55822.html
Back to top
View user's profile Send private message
dilpreet

New User


Joined: 18 Mar 2008
Posts: 34
Location: INDIA

PostPosted: Fri Mar 28, 2014 9:21 pm    Post subject: Reply to: skip header records from input file
Reply with quote

Thanks everyone. I was able to run the job using

//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,3,CH,EQ,C'--MEMBER'),PUSH=(81:3,6))
OUTFIL FNAMES=SORTOUT,INCLUDE=(81,6,CH,EQ,C'MEMBER'),BUILD=(1,80)
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 24 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
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


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