hello everybody.
I need a hand.
I have two input files, with the same key and I have to create two output files.
all files (both input and output files) have the following characteristics:
Record format. . . : FB
Record length. . . : 290
the key is on three fields with the following characteristics:
Field 1: length 8 from position 14 (it is a field packed)
Field 2: length 10 from position 38 (it's a date)
Field 3: length 10 from position 58 (it's a date)
In the first output file i will have to put all records that do not exist in the input file 2 and with the date (the key field n ° 3) lower than a reference date that I define as a parameter (for example defines that the reference date is 2010-02-28).
In the second file I'll put all the records that exist in the input file 2 + all records with the date (the key field n ° 3) greater than the date defined by me.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
theone1987,
Is the combination of field1 + field2 + field 3 unique? or do you have duplicates in both files? It would be a good idea if you showed the displayable field1 (packed decimal field) values also
Is the combination of field1 + field2 + field 3 unique? or do you have duplicates in both files? It would be a good idea if you showed the displayable field1 (packed decimal field) values also
Is the combination of field1 + field2 + field 3 unique? or do you have duplicates in both files? It would be a good idea if you showed the displayable field1 (packed decimal field) values also
I did not understand what you mean, sorry
What kolusu wants to understand is can there be multiple occurrences of
same combination of f1 f2 and f3 is possible?
eg
Can your input file have data like below. similarly for second file.
In the second file I'll put all the records that exist in the input file 2 + all records with the date (the key field n ° 3) greater than the date defined by me.
In the second file I'll put all the records that exist in the input file 2 + all records with the date (the key field n ° 3) greater than the date defined by me.
I need to "clean" a table from a certain date. This date may not always be the same, but I decide the date from which to start "cleaning".
(Warning: I do not choose the date within the record
XXXXXXXX ...... ...... 2010-01-31 ..... 2010-01-31)
however there are instructions that I have never used (I am not an expert, yet), so might you explain it?
eg
a)
/ / SORTOUT DD DSN = & & HEADR, DISP = (, PASS), SPACE = (TRK, (1,0), RLSE)
/ / SYSIN DD *
SORT FIELDS = COPY
OUTFILE REMOVECC, BUILD = (290X), header1 = (3C '$')
b)
Inreco ifthen = (WHEN = GROUP, BEGIN = (1,3, CH, EQ, C'$$$'), PUSH = (291: ID = 1))
c)
OUTFILE = OTHER FNAMES, BUILD = (1,290)
INCLUDE = (291.1, ZD, GT, 2, AND, 58.10, CH, GT, C'2009-12-31 ', AND,
001.3, CH, N, C'$$$')
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
the code works...
i have one more question left...
if I wanted to extract all records with a date less than the current date, how do I?
for example
Today is March 20, 2010, I want all records with date <January 31, 2010
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
theone1987,
You don't have to use symbols to get the desired results. You can use DATE1+n , DATE1-n (n can be any number from 1 to 9999), which would give current date + n days or current date - n days in C'yyyymmdd' format.
However there is no direct feature to get the last day of two months ago. There is a trick to get the last date of the month. Is there any other condition ? And please describe all your requirements at once.