Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Query for Counting number of records in a file.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Query for Counting number of records in a file.
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: 500
Location: USA

PostPosted: Mon Aug 11, 2008 8:27 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us