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

control card to check the headers and abend the job


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sudhamani

New User


Joined: 08 Nov 2007
Posts: 19
Location: india

PostPosted: Fri May 16, 2008 6:36 pm
Reply with quote

hi

My requirment is to abend the job if I have 3 or 4 HEADERS or Trailers in 2 files PROCESSING IN JOB.
FILE-1
H200711051317
DETAIL RECORDS..........................
T20080107105000000000000000
H200805051115
DETAIL RECORDS..........................
T20080505111500119500000041

FILE-2
H200711051317
T20080107105000000000000000
DETAIL RECORDS..........................

any control card to check it and abend the job

Thank you.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri May 16, 2008 7:00 pm
Reply with quote

Why don't you just use the solution you were given before and concatenate the two files for the input.
Back to top
View user's profile Send private message
sudhamani

New User


Joined: 08 Nov 2007
Posts: 19
Location: india

PostPosted: Fri May 16, 2008 7:28 pm
Reply with quote

yes i tried like that but it is working individually with 3 or individually with 4 not with combinedly checking 3 or 4 condition.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri May 16, 2008 8:46 pm
Reply with quote

sudhamani,

The following DFSORT JCL will give you the desired results. If there are 3 or more header or trailers we abend or else the job ends with a return code of zero

Concentate both files to sortin

Code:

//STEP0100 EXEC PGM=ICEMAN,PARM='RC16=ABE'                 
//SYSOUT    DD SYSOUT=*                                   
//SORTIN    DD *                                           
H200711051317                                             
DETAIL RECORDS..........................                   
T20080107105000000000000000                               
H200805051115                                             
DETAIL RECORDS..........................                   
T20080505111500119500000041                               
H200711051317                                             
T20080107105000000000000000                               
DETAIL RECORDS..........................                   
//SORTOUT  DD SYSOUT=*                                     
//SYSIN    DD *                                           
  INCLUDE COND=(1,1,SS,EQ,C'H,T')                         
  INREC IFTHEN=(WHEN=INIT,BUILD=(1,1,C'0100',X)),         
        IFTHEN=(WHEN=(1,1,CH,EQ,C'T'),OVERLAY=(2:C'0001'))
  SORT FIELDS=(6,1,CH,A)                                   
  SUM FIELDS=(2,2,ZD,4,2,ZD)                               
  OUTFIL OMIT=(2,2,ZD,GE,3,OR,4,2,ZD,GE,3),NULLOFL=RC16   
/*                                                         


Hope this helps...

Cheers
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts SCOPE PENDING option -check data DB2 2
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top