Rules:
The input file will always contain 600 records as dates in YYYYMMDD format(giorgian format).I need to create the output file in YYDDD format(julian format) appended with day i.e. 1 to 7 where 1=sunday, 2=monday....7=saturday.
After that the five digits(column 5 to 10) corresponds to holiday flags in five different states(S1,S2,S3,S4,S5) for the following days which may not be present in the input file. If its holiday (including saturday sunday) then it should be flagged with 0 and if its not a holiday then it should be 1.
list of holiday:
1st JAN all the states(S1,S2,S3,S4,S5)
26th JAN all the states(S1,S2,S3,S4,S5)
2nd march for S5
9th march s3
10th april all the states(S1,S2,S3,S4,S5)
13th april all the states(S1,S2,S3,S4,S5)
25ht april all the states(S1,S2,S3,S4,S5)
4th may for S2
1st june for S5
8th june for S1,S2,S3,S4
28th sep for S5
5th oct for S2 and S4
2nd Nov for S3
25th Dec all the states(S1,S2,S3,S4,S5)
26th Dec all the states(S1,S2,S3,S4,S5).
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
Quote:
After that the five digits(column 5 to 10) corresponds to holiday flags in five different states(S1,S2,S3,S4,S5) for the following days which may not be present in the input file. If its holiday (including saturday sunday) then it should be flagged with 0 and if its not a holiday then it should be 1.
Rajatbagga,
The output you show does NOT match the requirements. take the first record.20080101( January 1st) is indeed a holiday and yet you show the 5 flags as 1. It should be zeros.
Assuming that it is a typo then the following DFSORT JCL will give you the desired results.
Thanks a lot you are a Genius. I need one more favour regarding this, Kindly let me know how can I create the above input file starting form date 20080101 till 600 days. I mean from 20080101 to 20090822 by writing a JCL intself.
Eveything is exacly same but If i compare the two outputs carefully then in the lines 80FCCCCCC letter F is not there, it should be like 80CCCCCCC. Can you please let me know how can i rectify this.
Eveything is exacly same but If i compare the two outputs carefully then in the lines 80FCCCCCC letter F is not there, it should be like 80CCCCCCC. Can you please let me know how can i rectify this.
Now Kindly let me know how can I create the above input file(mentioned in my first post) starting form date 20080101 till 600 days. I mean from 20080101 to 20090822 by writing a JCL itself.
Kolusu's job gives the results you wanted with DFSORT. If you had to do what you said to get the correct results, then you're using Syncsort (WER messages), not DFSORT (ICE messages). DFSORT uses a C sign for conversion to PD. Syncsort uses an F sign for conversion to PD.
Since you're not using DFSORT, please don't post in the DFSORT Forum. Kolusu and I are DFSORT developers. DFSORT and Syncsort are competitive products. We're happy to answer questions on DFSORT and DFSORT's ICETOOL, but we don't answer questions on Syncsort.
Actully this was required at two of my mainframe sites one uses DFSORT and other uses SYNCSORT.
The results coming with DFSORT were perfect. I stimulated the same code with syncsort as well and its working fine now.
Can you please let me know how can I create the above input file(mentioned in my first post) starting form date 20080101 till 600 days. I mean from 20080101 to 20090822 by writing a DFSORT JCL itself.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
With z/OS DFSORT V1R5 PTF UK51706 or z/OS DFSORT V1R10 PTF UK51707 (Nov, 2009), you can now use WEEKDAY date functions to calculate the day of the week and also holidays as shown below
With z/OS DFSORT V1R5 PTF UK51706 or z/OS DFSORT V1R10 PTF UK51707 (Nov, 2009), you can now use TOJUL/TOGREG date functions to generate a 9 byte file of dates starting from Jan 1st of the current year followed by the next 600 days.