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
 

 

How can i do this using ICETOOL?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How can i do this using ICETOOL?
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    Post subject: Reply to: How can i do this using ICETOOL?
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    Post subject:
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 Moderator


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

PostPosted: Thu Sep 04, 2008 9:09 pm    Post subject:
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    Post subject: Reply to: How can i do this using ICETOOL?
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    Post subject:
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    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 How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts ICETOOL higher option Anshul Das DFSORT/ICETOOL 14 Thu Apr 14, 2016 8:00 am
No new posts Compare Files and extract matching re... vimalravi83 DFSORT/ICETOOL 3 Wed Jan 06, 2016 2:42 pm


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