[Download-List] header record padding (was Header record/date format)
Shawn Waldie
waldies at sanjuancollege.edu
Thu Feb 26 15:45:03 EST 2004
I'm trying to produce an extract that contains a 'fixed-width' header
record, with the remaining records being delimited. So far, I have the
following:
DOWNLOAD file \
FILE _HOLD_ hold.record \
FORMAT QUOTE OVERWRITING \
HEADING \
EVAL "'STU_PERSON Nth WEEK STATS ALL
TERMS ':OCONV(@DATE,'D4-YMD'):'TEST GROUP
2000000
'" \
DETAIL \
...and it's producing a header record that looks like:
"STU_PERSON Nth WEEK STATS ALL TERMS
2004-02-26TEST GROUP "
As you can see, it's missing the '20000000' along with a bunch of padding.
After that problem is solved, I need to figure out how to get rid of the
outer-most double quotes - assuming there is a way.
TIA
Shawn
-----Original Message-----
From: David L. Rotman [mailto:rotmand at cedarville.edu]
Sent: Tuesday, February 24, 2004 11:27 AM
To: download-list at cedarville.edu
Subject: RE: [Download-List] Header record/date format
The design dilemma is that DOWNLOAD has no way to know how
much space to reserve for the EVAL expression when using FIXED format.
Here are two ways to get the job done:
SELECT PERSON SAMPLE 5
DOWNLOAD PERSON \
FILE HOLD XWDS.TEST FORMAT FIXED OVERWRITING \
HEADING \
LITERAL "ABC" \
EVAL "OCONV(@DATE,'D4/')" FMT "10L" \
LITERAL "DEF" \
DETAIL PERSON.NAME
SELECT PERSON SAMPLE 5
DOWNLOAD PERSON \
FILE HOLD XWDS.TEST FORMAT FIXED OVERWRITING \
HEADING \
EVAL "'ABC':OCONV(@DATE,'D4/'):'DEF'" \
DETAIL PERSON.NAME
More information about the download-list
mailing list