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
 
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 ASP3 ABEND IN CICS Vedant CICS 0 Fri Oct 20, 2017 3:18 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts C03 ABEND sjiraga PL/I & Assembler 1 Thu Jun 01, 2017 4:51 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm

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