Posted: Mon Mar 20, 2006 10:47 pm Post subject: Date Replacing using JCL
Hi..
I am having a Flat File, recfm is FB and Lrecl is 80...In 25 position having some dates(YYYYMMDD). My requirement is i want to change the Existing Dates to Current Date usig JCL.
I am getting syntax error.Can u please let me know what should be the correct code ?.
Code:
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 18:43 ON TUE MAR
SORT FIELDS=COPY
OUTREC FIELDS=(1,4,DATE=(4MD-))
$
ICE007A E SYNTAX ERROR
ICE052I 3 END OF DFSORT
The DATE1 code also did not work in my test shop and i am guessing that i have R14 (not latest PFT) which is not supporting me , so i had run your code in my development system and it works fine.You are simply great.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue Mar 21, 2006 10:16 am Post subject:
nbdtrjk,
Quote:
STEP0100 ABC 2006-03-21
STEP0200 ABC 2006-03-21
In Both the above Steps i got same values...What is wrong in that...and Give explanation abt OUTREC FIELDS=(1,4,DATE=(4MD/))... Espeically DATE=(4MD/)
Are you sure that step0100 produced the date with hyphens even though your control card has / as the date seperator?
DATE(abcd)
Specifies printing of the date.For example, on March 21, 2006, DATE(4MD-) would produce '2006-03-21' and DATE(4MD/) would produce '2006/03/21' and DATE(MDY.) would produce '03.21.06'
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue Mar 21, 2006 10:49 am Post subject:
Quote:
Both the above Steps i got same values...What is wrong in that ?
huh ? What exactly is your question? Date=(4md/) would produce '2006/03/21' and Date1 would produce 20060321 and using OUTREC on OUTFIL we are reformating it to '2006/03/21'
I just showed shekhar123 an example since his sort version gave an error on Date=(4md/) parm. So I showed him an alternate method to get the desired result.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Mar 21, 2006 11:21 am Post subject:
Code:
OUTREC FIELDS=(1,4,DATE=(4MD-))
works fine with DFSORT R14 or z/OS DFSORT V1R5 as long as you have the Dec, 2004 PTF and will give you C'yyyy-mm-dd'. You could also use DATENS=(4MD) if you don't want the separator character - that will give you C'yyyymmdd'.
DATE1 will give the same result as DATENS=(4MD). DATE1(-) will give you the same result as DATE=(4MD-). The DATEn variations have been available with DFSORT since March, 2002, so if they don't work, you're very, very far behind on DFSORT service. Ask your System Programmer to install DFSORT R14 PTF UQ95213 (it's free). That will get you all the latest DFSORT/ICETOOL functions.
Quote:
I am having a Flat File, recfm is FB and Lrecl is 80...In 25 position having some dates(YYYYMMDD). My requirement is i want to change the Existing Dates to Current Date usig JCL.
Note that with the Dec, 2004 DFSORT PTF, you can use:
Code:
OPTION COPY
OUTREC OVERLAY=(25:DATE1)
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum