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

Capturing IDCAMS Record Counts


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

New User


Joined: 13 Apr 2006
Posts: 1

PostPosted: Thu Sep 11, 2008 12:47 am
Reply with quote

I am trying to capture records counts from an IDCAMS job step. I can do this from a sort utility, using an OUTFIL parameter; but I don't see any good way to do it with an IDCAMS job step.

What I want to do is copy the count that is seen in the SYSOUT to a file, that can be read by another program.

Any ideas?
Back to top
View user's profile Send private message
harinadh

New User


Joined: 01 Sep 2004
Posts: 18

PostPosted: Thu Sep 11, 2008 1:46 am
Reply with quote

You can get the record count details using SORT utility using the information available in the SYSOUT dataset. Point the SYSOUT information to a dataset and using INCLUDE COND you can get the information.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Thu Sep 11, 2008 1:54 am
Reply with quote

i would do something like this: (assuming u are working on VSAM datasets)..

Code:

//SDECOLL EXEC PGM=IDCAMS                           
//SYSPRINT DD DSN=&&TMP1,                           
//            UNIT=SYSDA,                           
//            DISP=(NEW,PASS,),                     
//            SPACE=(TRK,(15,15),RLSE),             
//            DCB=(LRECL=300,BLKSIZE=24000,RECFM=FB)
//SYSIN DD *                                         
 LISTCAT ENT(XXX.KSDS) ALL       
/*                                                   
//EXTRTDT1 EXEC PGM=SELCOPY  (OR OTHER FILE TAILORING UTILITY)                         
//INDD      DD DSN=&&TMP1,DISP=(OLD,PASS)             
//OUTDD     DD DSN=XXX.WHAT.EVER,                           
//             UNIT=SYSDA,                           
//             DISP=(NEW,KEEP,KEEP),                     
//             SPACE=(TRK,(15,15),RLSE),             
//             DCB=(LRECL=300,BLKSIZE=24000,RECFM=FB)
//SYSPRINT  DD SYSOUT=*                               
//SYSIN DD *                                         
   WRITE YOUR LOGIC HERE to extract REC-TOTAL from the &&TMP1...             
/*                                                   


but it would be helpful to know why you want to do this using IDCAMS.. what's the business requirement..
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Sep 11, 2008 11:32 am
Reply with quote

Especially as the IDCAMS record count is only updated at sucessful close of dataset.
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
Search our Forums:

Back to Top