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
 

 

If the record count is > 35,000 then I have to ignore oth

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

New User


Joined: 31 Jan 2006
Posts: 49

PostPosted: Fri Jun 29, 2007 3:34 pm    Post subject: If the record count is > 35,000 then I have to ignore oth
Reply with quote

I have a file, it is having more records.
My requirement is if the record count is more than 35,000 then I have to ignore all the remaining records.



Raj
Back to top
View user's profile Send private message

agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Fri Jun 29, 2007 3:42 pm    Post subject:
Reply with quote

You can not ignore as such but you can input only required number of records to the program.
add following sort step before your program step-
Code:
//STEP01   EXEC PGM=SORT
//SYSOUT   DD   SYSOUT=*
//IN       DD   DSN=Input,DISP=SHR
//OUT      DD   DSN=Output,DISP=SHR
//SYSIN    DD   *
   OPTION=COPY,STOPAFT=35000
/*

give OUT file as input to your step.
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Fri Jun 29, 2007 3:47 pm    Post subject: Re: how to do it in JCL
Reply with quote

You can use the following sort card to do this

//SYSIN DD *
SORT FIELDS=COPY,STOPAFT=35000
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Fri Jun 29, 2007 3:49 pm    Post subject:
Reply with quote

Or you may use IDCAMS with REPRO and COUNT.
Back to top
View user's profile Send private message
bhoja

New User


Joined: 31 Jan 2006
Posts: 49

PostPosted: Fri Jun 29, 2007 5:00 pm    Post subject:
Reply with quote

Thanks for the update
Sorry,
I have not mentioned one point on that.
The file contains products like A, B, C,....etc.
and each product is having more than 35,000 records.
My sortout file should contain all the products of 35,000records.
means,product A should be 35000, product B should be 35000 and C should be 35000.
Do you have any idea on this.

Thanks
Raj
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 Jun 29, 2007 8:09 pm    Post subject:
Reply with quote

What do you mean by a "product"?

Are the records sorted by "product"?

Please show an example of the records in the input file (just a few records for each "product") and what you expect for output. Give the starting position, length and format of the relevant fields. Give the RECFM and LRECL of the input file.
Back to top
View user's profile Send private message
bhoja

New User


Joined: 31 Jan 2006
Posts: 49

PostPosted: Sat Jun 30, 2007 10:01 pm    Post subject: Re: If the record count is > 35,000 then I have to ignore
Reply with quote

Hi,
Product means it is store number
It is a sorted file. its LRECL is 131, and key is store number
The input file is like this,

1234ffffbabnbnnbnneennnbnndnbnn
1234gbnnsmbnms/mnmmsmn
1234d gbfgnmfgmnmfgmngnm
1234ggnsgsmnsnsdgndhrngdfn
1234gnbfgfmnmgnfsfmmmfmh
2345dgbnnhnhnitthithninngndgnb
2345fgnngjgohjjthjsohinjoghijfhnfgf
2345fgnkxfgnnnnngknnknggnknkg
2345xgfbngnfnxggndgdkngkidndfg
2345dgbnxnhnknxkgghnnkxghgkn
2345xfjhnmngghxnk.xgfghnknkxhkn
.
.
.
.
.
.

in this 1234, 2345 ..are all store numbers.
Each store is having more than 35000 records.
My requirement is to copy only 35000 records from each store into one output file.

Raj
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: Sun Jul 01, 2007 8:21 pm    Post subject:
Reply with quote

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/131)
//SORTOUT DD DSN=...  output file (FB/131)
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(132:SEQNUM,8,ZD,RESTART=(1,4))
  OUTFIL INCLUDE=(132,8,ZD,LE,+35000),
    BUILD=(1,131)
/*
Back to top
View user's profile Send private message
bhoja

New User


Joined: 31 Jan 2006
Posts: 49

PostPosted: Sun Jul 01, 2007 9:19 pm    Post subject:
Reply with quote

Thank you very much Frank.
I will try this code. If I faced any problem I will come back to you.

Raj
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 update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 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 sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
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 Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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