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

No. of Records in Dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chkiran2

New User


Joined: 24 Jun 2004
Posts: 24
Location: Gurgoan

PostPosted: Fri Jul 09, 2004 2:30 pm
Reply with quote

Hi
Using JCL how can we find the total number of records in a dataset. Are there any tools specific for this or can we use SORT/SYNCSORT to do this. If so how to do that? Can some one help me giving code to do that.

Kiran
Back to top
View user's profile Send private message
sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 150
Location: Tokyo, Japan

PostPosted: Fri Jul 09, 2004 3:15 pm
Reply with quote

Hi Kiran,
If you copy the dataset to any temporary file using IDCAMS or SORT the at the spool you will get the output records copied or OUT count (in case of sort).
Code:
//STEP01  EXEC PGM=SORT
//SORTIN   DD  DSN=INPUT DSN,DISP=SHR
//SORTOUT  DD  DSN=&&TEMP,DISP=Give as your input
//SORTLIB  DD  DSN=SYS1.SORTLIB,
//            DISP=SHR
//SORTWK01 DD  UNIT=DISK,SPACE=(CYL,50,,CONTIG)
//SORTWK02 DD  UNIT=DISK,SPACE=(CYL,50,,CONTIG)
//SYSOUT   DD  SYSOUT=*
//SYSIN    DD  *
    SORT   FIELDS=COPY
/*
//*

Or IDCAMS
Code:
//SAVE    EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=*
//IN        DD DSNINPUT DSN,
//            DISP=SHR
//OUT       DD DSN=&&TEMP,other as your input
//SYSIN     DD *
   REPRO INFILE(IN) OUTFILE(OUT)
//*
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top