Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
No. of Records in Dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: No. of Records in Dataset
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: 151
Location: Tokyo, Japan

PostPosted: Fri Jul 09, 2004 3:15 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us