For the above code it displayed all records which are all having the date field less than the Header date .
But i need one day prior day record,if not available in the input file means, needs three day prior day record(ie 20100514 date record).
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue May 18, 2010 10:22 am Post subject:
shyamsaravan,
I am repeating the same answer as I gave on the other board. SORT products do NOT have capability of performing date arithmetic on any date. _________________ Kolusu
www.linkedin.com/in/kolusu
Joined: 12 May 2010 Posts: 44 Topics: 12 Location: India
Posted: Wed May 19, 2010 3:36 am Post subject:
oK,,Please let me know any filter code can use for the above code to give a immediate lesser date record only.
Can you clarify any JCL code can do date arithmetic function
Joined: 12 May 2010 Posts: 44 Topics: 12 Location: India
Posted: Wed May 19, 2010 8:18 am Post subject:
My requirement is changed..Now we need to fetch latest 10 earlier prior date records and write to o/p with compare of current date.(No need to consider Header date)
The input file is same as what i mentioned earlier
for Ex if current date is 19th may 2010 means, we have to use the folllowing search key to retieve the records
0310RON20100518--->18th may 2010
0310RON20100517
0310RON20100514
0310RON20100513
0310RON20100512
0310RON20100511
0310RON20100510
0310RON20100507
0310RON20100506
0310RON20100505-->5th may 2010
00HEADER 18/05/10
0310RON20100518
0310RON20100517
0310RON20100514--->see here ,the previous two days record missing,bcoz of Sat and Sun
0310RON20100513
0310RON20100512
0310RON20100511
0310RON20100510
0310RON20100507
0310RON20100506
0310RON20100505
0310EUR20100518
0310EUR20100517
0310EUR20100514
0310EUR20100513
0310EUR20100512
0310EUR20100511
0310EUR20100510
0310EUR20100507
0310EUR20100506
0310EUR20100505
0311RON20100518
0311RON20100517
0311RON20100514
0311RON20100513
0311RON20100512
0311RON20100511
0311RON20100510
0311RON20100507
0311RON20100506
0311RON20100505
0311EUR20100518
0311EUR20100517
0311EUR20100514
0311EUR20100513
0311EUR20100512
0311EUR20100511
0311EUR20100510
0311EUR20100507
0311EUR20100506
0311EUR20100505
99TRAILER 000040 00001 00001 000042
so Trailer record should have the following details
000040-->indicates Total no of detail records
000001-->indicates Header record count
000001-->indicates Trailer record count
000042-->indicates Total No of records
Please let me know,if any
Give the solution please....
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed May 19, 2010 10:24 am Post subject:
shyamsaravan wrote:
My requirement is changed..Now we need to fetch latest 10 earlier prior date records and write to o/p with compare of current date.(No need to consider Header date)
The following will fetch all records which are greater than or equal to current date - 10 days.
for ex: today is may 19th , so minus 10 days gives May 9th , so any record which has a date greater than or equal to may 10 are written to the output file along with the header record. we create the trailer record at the end with counts. Note that counts are only 6 bytes in length. If you have more 999,999 then your counts will be off. so make sure to adjust the length
Above code is working fine,,but, in case of ,The input file does not have month of May records means,the o/p is not dispalyed anything.
In such a case the o/p should be displayed on previous month(April) 10 days records(ie latest earlier dates record);
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu May 20, 2010 9:58 am Post subject:
shyamsaravan wrote:
Above code is working fine,,but, in case of ,The input file does not have month of May records means,the o/p is not dispalyed anything.
In such a case the o/p should be displayed on previous month(April) 10 days records(ie latest earlier dates record);
Any possible to do that ?..
Thanks in advance
what happens if you don't find APRIL records? You need to go back to March? and even if that is NOT found you go back a month again? This seems a never ending loop _________________ Kolusu
www.linkedin.com/in/kolusu
Joined: 12 May 2010 Posts: 44 Topics: 12 Location: India
Posted: Fri May 21, 2010 1:34 am Post subject:
Yes,,
You are right,If the april month record also not available means go for march..search will end at 1 st jan 1979 ,and the records not available means it comes termination..
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Fri May 21, 2010 7:39 am Post subject:
shyamsaravan wrote:
You are right,If the april month record also not available means go for march..search will end at 1 st jan 1979 ,and the records not available means it comes termination..
It is working fine,but i feel too much of complexity,because it is used 5 OUT files and again it is concatenated to last output GDG file.
Any possibility do the code with one output file OR any other logic.
see below the O/P-->it doesnt have month of may records,,so it displayed month of April records, Please help me in anyway..
shyamsaravan,
Is this a different job? The job you have shown,is not comparing the records to the current date or header date
you are just picking up the first 10 records in each group. It can be done much easily if that is indeed the real requirement. You just wasted 4 days with poor description. Post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question.
Learn to use BBCODE which will have columns aligned and easy to read. Read here
Joined: 12 May 2010 Posts: 44 Topics: 12 Location: India
Posted: Mon May 24, 2010 4:09 am Post subject:
Pl excuse,,yes my requirement is changed...they feel it is complicated to get a records with compare of header date..so they wants only latest 10 days records which are available in the input file,Pl dont mind on Header date..
I feel the above coding is much lengthier(i used 5 output files),So that i need lesser coding for the same requirement,
Please guide me on the requirement.
I dont find any BBCODE info available at the mentioned link.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Mon May 24, 2010 10:33 am Post subject:
shyamsaravan wrote:
Pl excuse,,yes my requirement is changed...they feel it is complicated to get a records with compare of header date..so they wants only latest 10 days records which are available in the input file,Pl dont mind on Header date..
wow . I wish every complicated request gets changed to an easier one. Anyway use the following control cards which would give you the desired results.
I dont find any BBCODE info available at the mentioned link.
How do you think the code in this thread looks as if it is a mainframe session? It uses the BBCODE code block. Read it once again and understand it _________________ Kolusu
www.linkedin.com/in/kolusu
Joined: 12 May 2010 Posts: 44 Topics: 12 Location: India
Posted: Tue May 25, 2010 7:45 am Post subject:
1.Please clarify, why you are using EQUALS in the Sort card for this requirement ?
2.Is it degrade the performance?
3.Without using of EQUALS also,it gives desired output! Please guide me..
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue May 25, 2010 9:13 am Post subject:
shyamsaravan wrote:
1.Please clarify, why you are using EQUALS in the Sort card for this requirement ?
2.Is it degrade the performance?
3.Without using of EQUALS also,it gives desired output! Please guide me..
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