| View previous topic :: View next topic |
| Author |
Message |
ANDY Beginner

Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Tue Oct 19, 2004 3:01 am Post subject: How to calculate VSAM total records nubmer? |
|
|
I want to calculate VSAM file total records number in cobol program. Can someone show me a way?
Thank you. _________________ cheers,
Andy |
|
| Back to top |
|
 |
sandip Beginner
Joined: 28 Jul 2004 Posts: 18 Topics: 3
|
Posted: Tue Oct 19, 2004 3:58 am Post subject: |
|
|
| Is there any bindings that you have to use COBOL? Using LISTCAT, you can easily find the number of records in VSAM file. |
|
| Back to top |
|
 |
cobcurious Beginner

Joined: 04 Oct 2003 Posts: 68 Topics: 25
|
Posted: Tue Oct 19, 2004 5:13 am Post subject: |
|
|
Hi Andy,
I am assuming that you guys use DFSORT.
Use the following code:-
| Code: | //STEP001 EXEC PGM=SORT,
// COND=(0,LT)
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=MY.CICS.CODES,DISP=SHR
//SORTOUT DD DSN=MY.COB01020.OT01.COB,
// DISP=(NEW,CATLG,CATLG),
// UNIT=SYSALLDA,
// SPACE=(CYL,(5,10),RLSE),
// DCB=(LRECL=80,RECFM=FB)
//SYSIN DD *
OPTION COPY
OUTFIL NODETAIL,REMOVECC,
TRAILER1=(C'RECORD COUNT OF FILE: ',COUNT,80:X)
/* |
In the above code,MY.CICS.CODES is a VSAM file.You will get the result in the dataset MY.COB01020.OT01.COB
Hope this helps
Cheers
Cobcurious
8) |
|
| Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12401 Topics: 75 Location: San Jose
|
|
| Back to top |
|
 |
ANDY Beginner

Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Mon Oct 25, 2004 2:59 am Post subject: |
|
|
Thank you everyone. _________________ cheers,
Andy |
|
| Back to top |
|
 |
|
|
|