NULL might just be spaces (i putted in 'xxxxxxxx'
CGW is our systemcode, just a alphanumeric field
It appears we can delete any record that does not start with a '1' - right? No, that's not right. The first 4 records should be deleted as well as the last one
N(x) types are charachter numeric, as in your example
Let's say the input file consists of the first 7 records (so including the 1049 en 1050 and 1062) as well as the last one the the output must look like this
for date I took 20081020 (20 Octobre 2008), for time 211632
the version-number was 0005, so becomes 0006
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
It appears we can delete any record that does not start with a '1' - right? No, that's not right. The first 4 records should be deleted as well as the last one
I don't understand. In your input example, these are the first four records you show:
Code:
Doorbelasting voor ALLE loketten
Totaal aantal loketten : 377713;
bankcode;banknaam;aantal loketten;%;
and this is the last record you show:
Code:
totaal;377713;100;
Those are the ones you say you want deleted. They also happen to be the only ones in your example that do NOT have '1' in position 1. So how is deleting the first 4 records and the last record different from deleting the records that don't have a '1' in position 1?
Can any of the first 4 records have a '1' in position 1? Can the last record have a '1' in position '1'? Can any of the other records NOT have a '1' in position 1?
I'm just looking for a way to use an OMIT condition to delete the records you want to delete since that's easier then deleting the last record. If the not '1' test won't work, then is there another test that will work such as a test for a non-numeric in position 1?
Maybe you need to show a better example of the input records?
This input record has 223:
1062;Cooperatieve Rabobank Valkenburg aan de Geul U.A.;223;0,06;
But for output, you show 0023:
120081010620023
Where did the 0023 come from? That's supposed to be an N(7) output field - how does that fit with the 4-character input field, for example, '1992' or '0223' -> N(7) field with leading zeros or N(4) field with leading zeros or what?
Other inconsistencies/questions:
In your description of the header, you show the CCYYMMDD value twice. In your output header, you show it once. Which is it?
You didn't answer my question about the year and month the data are related to. In your output records you show '200810' so is it just the current year and month?
What is the RECFM and LRECL of the input file?
What is the RECFM and LRECL of the output file?
What is the RECFM and LRECL of the separate file with the version number? Does the value in this file have 5 digits or 4 digits? That is:
Can any of the first 4 records have a '1' in position 1? No
Can the last record have a '1' in position '1'? No
Can any of the other records NOT have a '1' in position 1? Yes
The records I need will always start with 4 positions numeric before the first delimiter
I was indeed wrong about the header record. it should contain two times the date, which are just current year and month and day
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Another question:
This input record has 223:
1062;Cooperatieve Rabobank Valkenburg aan de Geul U.A.;223;0,06;
But for output, you show 0023:
120081010620023
Where did the 0023 come from? That's supposed to be an N(7) output field - how does that fit with the 4-character input field, for example, '1992' or '0223' -> N(7) field with leading zeros or N(4) field with leading zeros or what?
Assuming that you just want that field copied as is, here's my guess at a DFSORT job that will do what I think you want. If it doesn't give you what you want, then explain where the output it produces is different from the output you want.
Be sure I am very happy with your help
There is so much information in the Programming Guide that sometimes it is hard to find the right way
I look up your suggestions in the guide and so hope to learn something