Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
To detect records in Error files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
raghavendra_p_sarvade

New User


Joined: 17 Oct 2006
Posts: 32

PostPosted: Thu Feb 28, 2008 3:21 pm    Post subject: To detect records in Error files
Reply with quote

I have 40 error files. I need to set up a job which will abend if there is a record in any of the 40 files and also show which file exactly contained that record.

Can someone help me out?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8631
Location: Back in jolly old England

PostPosted: Thu Feb 28, 2008 3:23 pm    Post subject:
Reply with quote

Search the forum for empty dataset and that will give you a few good clues.
Back to top
View user's profile Send private message
raghavendra_p_sarvade

New User


Joined: 17 Oct 2006
Posts: 32

PostPosted: Thu Feb 28, 2008 4:05 pm    Post subject: Reply to: To detect records in Error files
Reply with quote

I tried the below one. But it doesn't show which file had record.

Any suggestions?

//STEP1 EXEC PGM=IDCAMS
//INPUT DD DSN=FILE1,DISP=SHR
// DD DSN=FILE2,DISP=SHR
// DD DSN=FILE3,DISP=SHR
// DD DSN=FILE4,DISP=SHR
// DD DSN=FILE5,DISP=SHR
// DD DSN=FILE20,DISP=SHR
// DD DSN=FILE40,DISP=SHR
//AMSDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT -
INFILE(INPUT) -
COUNT(1)
/*
//STEP2 EXEC PGM=IEBGENER,COND=(0,NE)
//SYSUT1 DD DUMMY
//SYSUT2 DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
ABOVE STEP HAVE RECORDS SO JOB ABENDED LOOK AT THE DATASET CREATED*
/*
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10396
Location: italy

PostPosted: Thu Feb 28, 2008 4:17 pm    Post subject: Reply to: To detect records in Error files
Reply with quote

are You looking for a specific record, or just empty/non empty
the "thing" will happen for only one dataset or for multiple dataset ?

the requirement might be clear for You, but it' s not clear for all

why abend the job, isn' t a return code enough

if only strings are being resarched why not use superc like this ...
Code:
//SEARCH  EXEC PGM=ISRSUPC,                                           
//            PARM=(SRCHCMP,
//            '')
//NEWDD  DD DISP=SHR,DSN=file1
//       DD DISP=SHR,DSN=file2
//       DD DISP=SHR,DSN=file.....
//       DD DISP=SHR,DSN=filen
//OUTDD  DD SYSOUT=(A)
//SYSIN  DD *
SRCHFOR  'STRING1'
SRCHFOR  'STRING2'
SRCHFOR  'STRING3'
...... add as many as you need

Code:
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 Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us