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
 

 

COUNT operator of ICETOOL

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

New User


Joined: 28 Aug 2006
Posts: 27
Location: NY, US

PostPosted: Tue Oct 17, 2006 11:07 pm    Post subject: COUNT operator of ICETOOL
Reply with quote

Hi,

I have a sequential file with header and trailer records. I have to put the header and trailer records in a different file for processing.

I was thinking of using COUNT operator to do it (getting the count and pulling record1 and record(count-1) ). But I do not know how exactly to do this.

Appreciate if someone could provide some information on this or anyother better way to do this.


Thanks in advance,
Daphne
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: Wed Oct 18, 2006 12:53 am    Post subject:
Reply with quote

Daphne,

I need some more information before I can show you how to do what you want to do.

Is there anything that identifies the header (e.g. 'HDR' in positions 1-3) or trailer (e.g. 'TRL' in positions 1-3) or are they just identified by being the first and last record in the file, respectively?

What is the RECFM and LRECL of the input file?

Please show an example of your input records and what exactly you want for output (one output file with just the header and trailer? another output file without the header and trailer? or what?).
Back to top
View user's profile Send private message
Daphne

New User


Joined: 28 Aug 2006
Posts: 27
Location: NY, US

PostPosted: Wed Oct 18, 2006 2:32 am    Post subject:
Reply with quote

Hi Frank,

Thanks for the reply. Kindly find below the details.

1) Yes. The header and trailer will be identified only by them being the first and last record in the file respectively.

2) RECFM = FB , LRECL = 150

3) I need one file with just the header and trailer records and another file with the detail records alone.

4) Kindly find below the file layout(only header and trailer records).

File Header Record

Service Code 001 ? 003
Type of File 004 ? 004
Filler 005 ? 016
Year 017 ? 020
Pay Type 021 ? 022
Date File Created 023 ? 030
Time File Created 031 ? 036
Filler 037 ? 147
File Source Code 148 ? 150


File Trailer Record

Service Code 001 ? 003
Type of File 004 ? 004
Filler 005 ? 016
Year 017 ? 020
Pay Type 021 ? 022
Number of
Detail records 023 ? 033
Filler 034 ? 150

Thank you,
Daphne
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: Wed Oct 18, 2006 3:15 am    Post subject:
Reply with quote

Daphne,

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

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/150)
//SYM DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
* Add seqnums in 151-158
  INREC OVERLAY=(151:SEQNUM,8,ZD)
* Sym:  Create a DFSORT symbol as:
* Lastrec,+n
* where n is the seqnum of the last record.
  OUTFIL FNAMES=SYM,REMOVECC,NODETAIL,
    BUILD=(80X),
    TRAILER1=('Lastrec,+',151,8,80:X)
* T1:  Copy input records with seqnums in 151-158.
  OUTFIL FNAMES=T1
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=&&T1,DISP=(OLD,PASS)
//HT DD DSN=...  header/trailer output (FB/150)
//DT DD DSN=...  detail output (FB/150)
//SYSIN    DD    *
  OPTION COPY
* HT: Use seqnums in 151-158 to get header record (seqnum=1)
* and trailer record (seqnum=Lastrec).  Remove seqnum.
  OUTFIL FNAMES=HT,
    INCLUDE=(151,8,ZD,EQ,+1,OR,151,8,ZD,EQ,Lastrec),
    BUILD=(1,150)
* DT: Get detail records.  Remove seqnum.
  OUTFIL FNAMES=DT,SAVE,BUILD=(1,150)
/*
Back to top
View user's profile Send private message
Daphne

New User


Joined: 28 Aug 2006
Posts: 27
Location: NY, US

PostPosted: Fri Oct 20, 2006 12:16 am    Post subject: Re: COUNT operator of ICETOOL
Reply with quote

Hi Frank,

Thanks a lot. I executed the JCL and then found out our shop is using SYNCSORT.

Anyway I have learned a lot. In the course of doing this I read your publications on DFSORT, ICETOOL and SYMBOLS. They are wonderful documents.

Thanks,
Daphne
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: Fri Oct 20, 2006 1:17 am    Post subject:
Reply with quote

Daphne,

If you or anyone else on this board would like some documents prepared by the DFSORT Team that describe what we see as the advantages of DFSORT over Syncsort, as well as considersations for migrating from Syncsort to DFSORT, send me an e-mail offline (yaeger@us.ibm.com). Please put "DFSORT" somewere in your Subject line to catch my attention.
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 abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am


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