Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
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
References
Moved: Mon Aug 11, 2008 7:29 pm by enrico-sorichetti From DFSORT/ICETOOL to JCL
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 260
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1