View previous topic :: View next topic
|
Author |
Message |
arunjakhar
New User
Joined: 09 Jan 2007 Posts: 1 Location: mumbai
|
|
|
|
Hi
Could anyone tell me how to check whether a particular VSAM file is empty or not?
We can do this using IDCAMS - PRINT but is there any other way to do so which gives return code less than 8. Just provide some sample code also if possible.
Thanks
Arun |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
HI There,
You can use dfsort for this
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//TOOLIN DD *
COUNT FROM(IN) EMPTY RC4
/* |
This will give a return code of 4 if the file is empty , |
|
Back to top |
|
|
prafull
New User
Joined: 08 Dec 2006 Posts: 48
|
|
|
|
if u repro the VSAM dataset to any dataset or dummy dataset ,
it wil give VSAM return code 160 -indicating Input VSAM file is empty
//STST50 EXEC PGM=IDCAMS,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
REPRO -
INFILE(INPUT) -
OUTFILE(OUTPUT)
/*
//INPUT DD DSN=...........
//OUTPUT DD DUMMY |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
And there is also LISTCAT in IDCAMS. |
|
Back to top |
|
|
|