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
 
control card to check the headers and abend the job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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
References
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1001
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

DFSORT Developer


Joined: 07 Dec 2007
Posts: 357
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1