View previous topic :: View next topic
|
Author |
Message |
arien
New User
Joined: 02 Nov 2006 Posts: 43 Location: London
|
|
|
|
Hi,
I have been trying to get around with DSNUPROC utility for UNLOADING a table. In the output format, I need a COLDEL of pipe ('|'), and I need no CHARDEL.
ie. if My table contains
Code: |
NAME AGE
Diane 35
Leo 31
|
My output file should be:
I tried replacing CHARDEL field with NOCHARDEL and CHARDEL '' , they both result in an error.
If I don't use CHARDEL, it defaults to enclosing characters in "double quotes".
Please advise, how to specify no CHARDEL in DSNUPROC ? |
|
Back to top |
|
|
arien
New User
Joined: 02 Nov 2006 Posts: 43 Location: London
|
|
|
|
Glad I could find a resolution.. there's a trick to it.
Use the DSNUPROC routine for full table UNLOAD then use ICEMAN program to remove quotes (which are the default CHARDEL field):
Code: |
//STEP30 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=<in file name>,DISP=SHR
//SORTOUT DD DSN=<out file name>,DISP=SHR
//SYSIN DD *
OPTION COPY
INREC FINDREP=(IN=X'7F',OUT=C'')
/*
// |
ps. The SORTIN and SORTOUT file names can be the same. also, X'7F' is the hexadecimal EBCDIC format of double quotes (") |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
arien,
very glad you were able to find a solution,
especially since I was unable to provide you any solutions to any of your problems.
thx for sharing. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
arien wrote: |
ps. The SORTIN and SORTOUT file names can be the same. |
Not a good idea! |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I agree with Craig and call it as "suicidal-sort". Suggest you take a back-up of your sortin before you do you what you said. |
|
Back to top |
|
|
arien
New User
Joined: 02 Nov 2006 Posts: 43 Location: London
|
|
|
|
Thanks for the suggestion Craq. I'll redirect output to a different PS. |
|
Back to top |
|
|
|