Richbob New User Joined: 13 Apr 2006 Posts: 1
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.
harinadh New User Joined: 01 Sep 2004 Posts: 18
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.
genesis786 Active User Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
i would do something like this: (assuming u are working on VSAM datasets)..
//SDECOLL EXEC PGM=IDCAMS
//SYSPRINT DD DSN=&&TMP1,
//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,
//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..
expat Global Moderator Joined: 14 Mar 2007 Posts: 8593 Location: Back in jolly old England
Especially as the IDCAMS record count is only updated at sucessful close of dataset.
All times are GMT + 6 Hours