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

How can i do this using ICETOOL?


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

New User


Joined: 30 Nov 2007
Posts: 15
Location: India

PostPosted: Wed Sep 03, 2008 3:51 pm
Reply with quote

Hi All,

Input file : FB, Lrec=80
108/05/03
108/05/06
108/05/04
108/05/04
108/05/04
108/05/06
108/05/01
108/05/04
108/05/06
108/05/01

Output file : FB, lrec=80
108/05/01 01
108/05/03 02
108/05/04 03
108/05/06 04
Note*-> Value written after space is the line number.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Sep 03, 2008 8:45 pm
Reply with quote

comp_ashok,

The following DFSORT JCL will give you the desired results


Code:

//STEP0100 EXEC PGM=ICEMAN                 
//SYSOUT   DD SYSOUT=*                     
//SORTIN   DD *                           
108/05/03                                 
108/05/06                                 
108/05/04                                 
108/05/04                                 
108/05/04                                 
108/05/06                                 
108/05/01                                 
108/05/04                                 
108/05/06                                 
108/05/01                                 
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                           
  OPTION EQUALS   
  INREC OVERLAY=(81:2,2,5,2,8,2)                             
  SORT FIELDS=(81,6,Y2T,A)                 
  SUM FIELDS=NONE                         
  OUTREC BUILD=(1,10,SEQNUM,2,ZD,13,68)   
/*     
Back to top
View user's profile Send private message
comp_ashok

New User


Joined: 30 Nov 2007
Posts: 15
Location: India

PostPosted: Thu Sep 04, 2008 10:21 am
Reply with quote

Hi Skolusu

Thanks for prompt reply.

I did my work with SEQNUM in OUTREC statement only. My SYSIN card

Code:

   SORT FIELDS=(1,9,CH,A)             
   SUM FIELDS=NONE                     
   OUTREC FIELDS=(1,10,SEQNUM,2,ZD)


This worked fine to my requirement.
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: Thu Sep 04, 2008 9:09 pm
Reply with quote

Ashok,

Kolusu assumed that the yy in your yy/mm/dd dates could reflect 19yy and 20yy dates and coded for that by using the Y2T format. If the yy in your dates only reflect 20yy dates, then your control statements will work fine.
Back to top
View user's profile Send private message
zero

New User


Joined: 01 Dec 2007
Posts: 21
Location: Hyderabad

PostPosted: Tue Sep 16, 2008 3:06 pm
Reply with quote

Hi,
i tried to do this using ICETOOL.

Code:
//TOOLIN   DD   *                                   
  SELECT FROM(INDD1) TO(T1) ON(1,9,CH) FIRST       
  COPY  FROM(T1) USING(CTL1)                       
/*                                                 
//CTL1CNTL DD   *                                   
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(11:SEQNUM,2,ZD))
  OUTFIL FNAMES=OUTDD1                             
/*       


the desired result is coming up.
But, here, my concern is i have used two verbs : SELECT and COPY.
is there any way to assign line numbers while using SELECT itself ?

Thank You,
...
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Sep 16, 2008 9:21 pm
Reply with quote

zero,

You need to show us the error messages also. You really don't need the second copy statement. You can create the seqnum in the SELECT operator itself like shown below

Code:

//TOOLIN   DD   *                                   
  SELECT FROM(INDD1) TO(OUTDD1) ON(1,9,CH) FIRST  USING(CTL1)
//CTL1CNTL DD   *                                   
   OUTFIL FNAMES=OUTDD1,OVERLAY=(11:SEQNUM,2,ZD)
/*


Hope this helps...

Cheers
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 Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts ICETOOL to Read records SMF CEF it is... DFSORT/ICETOOL 4
Search our Forums:

Back to Top