RE: Sort return codes

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: RE: Sort return codes
From: Kevin Corkery (kcorkery@comcast.net)
Date: Fri Aug 15 2008 - 10:10:55 EDT


I do this using an IDCAMS PRINT function.  You tell IDCAMS to print one
record from the file.  If the file has a record IDCAMS will set a zero
return code, when there are no records the command fails and a non-zero
return code is set. 

// DLBL INPUT,'< your input file >',,VSAM,CAT=<yourcat> 
// EXEC IDCAMS
   PRINT IFILE(INPUT) CHARACTER COUNT(1)
/*
// IF   $RC > 0 THEN
   GOTO SKIPFTP
  
If the input file is VSAM-MSAM or a regular SAM file you'll need to provide
the appropriate ENVIRONMENT specifications for IDCAMS.

-----Original Message-----
From: owner-vse-l@Lehigh.EDU [mailto:owner-vse-l@Lehigh.EDU] On Behalf Of
Ron Ashley
Sent: Friday, August 15, 2008 9:57 AM
To: VSE Discussion List
Subject: RE: Sort return codes

Dennis,

We did the following. We had a program to run after the previous program
that read the file and if there was 0 records then it would set a return
code that would jump the FTP or not release the FTP program.

-----Original Message-----
From: owner-vse-l@Lehigh.EDU [mailto:owner-vse-l@Lehigh.EDU] On Behalf Of
Dennis McLoud
Sent: Friday, August 15, 2008 8:47 AM
To: VSE Discussion List
Subject: Sort return codes

Does anyone know of a way to set a return code based on a sort having a sort
out count of zero? We need to skip the FTP step if the file has zero
records. If I could get the sort to set a return code when the count is zero
it would be easy to make this happen.

Thanks,
Dennis McLoud
Systronics, Inc.
913-829-9229


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Thu Aug 28 2008 - 19:35:13 EDT