Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
I do have a PS file RECFM=FB.
In that file, some fields are defined as packed decimal whereas some are binary and rest are character.
Now I want to convert PD and binary fields into displayble format. But the problem is for some records and for some fields (PD or binary) value could be "-----", indicating no data available for this field. So I don't want to convert that instance. Dashes("---") should remian dashes in output.
Input:
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
It's not clear exactly what the layout of your input record is, but you can use DFSORT's IFTHEN clauses to treat fields with dashes different than fields without dashes, e.g.
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
Hi Frank,
I tried your solution and it works for input file having fixed LRECL.
But the Input file I'm having has diff layout each time. In other words, its different input file with RECFM=FB and diff LRECL everytime. So I'm using SYMNAMES and generating sort cards dynamically (in previous step) to perform required functions.
Now, its tough to generate all those BUILD statements dynamically.
Isn't there any other way??
Something like converting dashes to such a value (low or high) which will not be converted by convert functions. And after converting other fields with simple OUTREC statement, converting those low or high values back to dashes.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
Something like converting dashes to such a value (low or high) which will not be converted by convert functions. And after converting other fields with simple OUTREC statement, converting those low or high values back to dashes
I have no idea what you're talking about here. You haven't explained clearly what you're trying to do or what your input and output looks like. You talk about generating statements, but don't give any details. I'm not a mindreader. If you want my help, you're going to have to explain clearly what you want to do with good examples.