Brian Westerman on IBM Mainframe Discussion List <[email protected]> wrote on 04/26/2011 02:25:05 AM: > The "occurrence" fields are 1 byte hex fields, and their offsets change > based on what they are set to as I outlined before. > > I noticed that Elardaus in a previous response had said you can save into > temporary fields, which is what I would like to do, (I think). > > Is anyone familiar enough with DFSORT to show me how that's done for > something like this?
Brian, Well, I'd like to think I'm pretty good with DFSORT and DFSORT's ICETOOL. :-) But, I'm having trouble understanding exactly what you're trying to do and I suspect it involves using dynamically computed positions which DFSORT can't do. By saving into temporary fields, I'd guess Elardaus was referring to the "trick" of inserting fields temporarily at the end of a record. For example, in the first IFTHEN clause, you could multiply two fields and put the result at the end of the record (after the existing fields, e.g. at positions 81-88 if the LRECL is 80). You could then use that temporary saved value from positions 81-88 in the next IFTHEN clause, and so on. But the computed (saved) value could not be used as the starting position (p) for a field since that must be a static value. I suppose you might be able to come up with some way to dynamically generate control statements with those saved values, but I suspect this would be very, very difficult to accomplish. However, perhaps if I understood better what you were tyring to do, I could come up with something. If you want me to try, please give me a better example of your input records and what you expect for output. Explain the rules for getting from input to output. Give the RECFM and LRECL of the input file. It would be best if we work on this offline ([email protected]). Frank Yaeger - DFSORT Development Team (IBM) - [email protected] Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

