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

Using ICETOOL to split a dataset using date logic


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

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Mon Aug 11, 2008 9:08 pm
Reply with quote

I have over 300,000 fixed blocked 48 byte records. The date is in positions 39-48 in YYYY-MM-DD format. I need to read these records into ICETOOL and separate them into two output datasets:
1. Records 90 days and older based on current date.
2. Records 89 days and younger based on current date.

There are also records on the input dataset that have no date (blanks in positions 39-48). I want these records directed to the "Records 90 days and older based on current date" output dataset.

Here are some sample input records:

Code:

----+----1----+----2----+----3----+----4----+---
CICS123  ABC07    VXX PORT 07 - QB7X  2008-08-01
CICS123  ABC08    VXX PORT 08 - QB7Y  2008-08-08
CICS123  ABC09    VXX PORT 09 - QB7Z  2008-07-14
CICS123  ABC10    VXX PORT 10 - QB70           
CICS123  ABC11    VXX PORT 11 - QB74  2008-08-11
CICS123  ABC12    VXX PORT 12 - QB75  2008-04-15
CICS123  ABC13    VXX PORT 13 - QB76  2005-03-11
CICS123  ABC14    VXX PORT 14 - QB77  2008-07-24
CICS123  ABC15    VXX PORT 15 - QB78           
CICS123  ABC16    VXX PORT 16 - QB79  2008-03-01
CICS123  ABC17    VXX PORT 17 - QB8A  2008-01-13
CICS123  ABC18    VXX PORT 18 - QB8B  2008-06-13
CICS123  ABC19    VXX PORT 19 - QB80           
CICS123  ABC20    VXX PORT 20 - QB81  2008-08-09
CICS123  ABC21    VXX PORT 21 - QC6Q  2007-05-29
CICS123  ABC22    VXX PORT 22 - QC6R  2007-08-11
CICS123  ABC23    VXX PORT 23 - QC6S  2008-05-11


Thank you.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Aug 11, 2008 10:57 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG   DD  SYSOUT=*
//IN DD DSN=...  input file
//GT90 DD DSN=...    output file1
//LE90 DD DSN=...    output file2
//TOOLIN   DD    *
COPY FROM(IN) USING(CTL1)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=GT90,
    INCLUDE=(39,10,CH,EQ,C' ',OR,39,10,CH,LE,DATE1(-)-90)
  OUTFIL FNAMES=LE90,SAVE
/*
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Tue Aug 12, 2008 12:54 am
Reply with quote

Thanks for the solution. It looks pretty straight forward from the control cards.

I also needed the records summed up (counted), but prior examples you have provided using the REMOVECC, NODETAIL, SECTIONS=(, and TRAILER3=( parameters has allowed me to understand the logic behind counting records based on a key field.

ICETOOL is an outstanding product!!

Have a great day.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Aug 12, 2008 1:14 am
Reply with quote

Quote:
ICETOOL is an outstanding product!!


I'm glad you like DFSORT's ICETOOL.
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
Search our Forums:

Back to Top