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
 

 

control card to check the headers and abend the job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: control card to check the headers and abend the job
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm


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