I have a requirement to process an input file and produce a comma separated list of numbers.
My input data set could contain 0, 1 or more rows, and for each I want a different output format.
If input is empty, I want one output row containing "0"
if input contains one row, i want just the relevant value from that row.
if input contains more than one row, i want a comma separated list of the relevant values.
So, to make this clearer, suppose my input file had the relevant value at (34,9). My copy step could look something like :
but this only works when the input file is non-empty.
SO...
I could either throw an RC4 on the empty input file condition, and handle this in a separate IF step
or
use HEADER1/TRAILER1 with a constant value of '0'. But there are two problems in doing this :
1. I would get the '0' for all input states, and so I would have to strip this for the non-null condition.
2. I am writing to FB (not FBA) ... i don't know how to do this without getting an ICE224A error ..
is there a elegant one (or two) step solution to give me what I want ? two steps would be great .. one would be really flash.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
It's not clear what you want to do. Please show an example of the input record(s) and the expected output record(s) for one row, two rows and five rows.
What is the RECFM and LRECL of the input file?
What is the RECFM and LRECL of the output file?
Quote:
2. I am writing to FB (not FBA) ... i don't know how to do this without getting an ICE224A error ..
The Programmer Response for ICE224A tells you how to do that (e.g. OUTFIL REMOVECC parameter):
When I looked up ICE224A in my manual i didn't get anything about the REMOVCC option :
-'DFSORT messages, codes and diagnosis guide' :
ICE224A ddname CANNOT BE USED FOR A
REPORT
Explanation: Critical. The OUTFIL report specified for
the OUTFIL data set associated with ddname cannot be
produced because either:
v the OUTFIL data set is VSAM, or
v the record format specified or retrieved for the
OUTFIL data set does not contain ’A’ (ASA carriage
control characters).
System Action: The program terminates.
Programmer Response: If the OUTFIL data set is
VSAM, it cannot be used for a report. If the OUTFIL
data set is non-VSAM, either let DFSORT set the
RECFM appropriately or specify a RECFM that includes
’A’.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
When I looked up ICE224A in my manual i didn't get anything about the REMOVCC option :
You're looking at an old version of the book from before REMOVECC was available. For the latest version of the DFSORT books, you should always look at: