Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Using ICETOOL to split a dataset using date logic

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Using ICETOOL to split a dataset using date logic
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 Moderator


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

PostPosted: Mon Aug 11, 2008 10:57 pm    Post subject:
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    Post subject: Reply to: Using ICETOOL to split a dataset using date logic
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 Moderator


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

PostPosted: Tue Aug 12, 2008 1:14 am    Post subject:
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    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 Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts ICETOOL - RESIZE DYNAMICALLY kranthikumarb DFSORT/ICETOOL 0 Tue Nov 21, 2017 5:30 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us