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

Query for Counting number of records in a file.


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

New User


Joined: 11 Aug 2008
Posts: 1
Location: bangalore

PostPosted: Mon Aug 11, 2008 7:28 pm
Reply with quote

Hi All

One of the jobs in my application is having a problem. It abends on getting an empty file. So i added the following condition to my job.
Code:

//*                                         
//EMPTY1  EXEC PGM=SYNCTOOL                 
//TOOLMSG DD SYSOUT=*                       
//DFSMSG  DD SYSOUT=*                       
//IN      DD DSN=IN16045.TEST.FILE,DISP=SHR
//TOOLIN  DD *                             
  COUNT FROM(IN) LOWER(1) RC 8             
//             


but it is giving the following error.

SYNCTOOL RELEASE 1.5.2 - COPYRIGHT 2004 SYNCSORT INC.
INITIAL PROCESSING MODE IS "STOP"
"TOOLIN" INTERFACE BEING USED

COUNT FROM(IN) LOWER(1) RC 8
INVALID OPERAND ON "COUNT" STATEMENT
OPERATION COMPLETED WITH RETURN CODE 12

PROCESSING MODE CHANGED FROM "STOP" TO "SCAN" DUE TO OPERATION FAILURE

SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 12


Can anyone help me regarding this?
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Mon Aug 11, 2008 8:27 pm
Reply with quote

COUNT can be used to set a RC of 0, 4, or 12. Please change your TOOLIN statement accordingly. For example:
Code:
//TOOLIN  DD *                             
  COUNT FROM(IN) LOWER(1) RC4
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top