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

In JCL ,to check current date against header of the i/p file


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

New User


Joined: 01 Mar 2007
Posts: 2
Location: india

PostPosted: Fri Mar 02, 2007 8:39 am
Reply with quote

In JCL ,I have to check current date against header of the input file,if matched i need to skip next step otherwise i need to proceed with that step.

-> Assume header having only date info format (ddmmyyyy)
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Mar 02, 2007 9:19 pm
Reply with quote

Here's a z/OS DFSORT V1R5 job that will do what you asked for. If the date in the record matches the current date, you'll get RC=16. If the date in the record does not match the current date, you'll get RC=0. You can use the RC to skip the next step or not.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DUMMY
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(5,4,3,2,1,2)
  OUTFIL OMIT=(1,6,CH,EQ,DATE1),NULLOFL=RC16
/*
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 How to split large record length file... DFSORT/ICETOOL 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top