My mainframe shop is having SYNCSORT and I'm having the following requirement.
1. Convert all the packed decimals in the file to zone decimals.
2. Input file is VB of 1000 record lenght.
3. In 210,225,245,235,255 lenght there are few packed decimals. But only for few records , details will be available after 210.
4. So when ever I try to convert the record after 210, the records for which no details are available it is not converting since the values for the fields short records are null.
In which fields after 217 is having short records issue. Since most of the records are not having records greater than 210. Please help me on how to solve this issue
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
If you have different record-types on the file, test the field which differentiates them and only attempt conversion of the fields on that record-type.
If you have occurs, with different numbers of entries, then test the count of the number of entries.
If you have both, do both.
If you have none of the above 1) you should 2) you could try to use the record-length.
EDIT: Are those decimal-points you are putting in most of the fields? That makes your field Numeric Edited not Zoned Decimal. Is that what you want?
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
Surely not what you are looking for, but why does someone believe it is a good idea to change the data from packed to zoned? This will waste space as well as require more resources to process.
If some data needs to be downloaded to a pc for example, that data could be formatted to be pc-friendly without making a mess of the entire data file.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
I agree about the signs. Unless the there is something, external to the amount field which tells you with absolute certainty what is what, I can't see how you can go without them.
'd have done this in Cobol. Checking everything I can for logical consistency, a big report, printed cross-reference, cross-reference file... headers and trailers on everything.
Going out with a SORT doing a blind field conversion seems to be going out with a whimper, instead of a BANG! Have the users saying "that old system, it only had green screens, but boy that history report never lets us down".
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Is this a file with variable-length records but only one type of record?
If so, somewhere there must be a count of the number of occurences.
You'd have to do all your static fields, then do some test to know how many of the coversions to do for the variable fields.
If you proceed with what you have now (setting aside for the moment the fact that it does not work) won't you only be changing the long records, and leaving all the others with their original packed data?