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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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