IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DSNUPROC - No CHARDEL needed


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arien

New User


Joined: 02 Nov 2006
Posts: 43
Location: London

PostPosted: Fri Aug 13, 2010 11:59 pm
Reply with quote

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:
Code:
Diane|35
Leo|31


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
View user's profile Send private message
arien

New User


Joined: 02 Nov 2006
Posts: 43
Location: London

PostPosted: Tue Aug 17, 2010 2:20 am
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 17, 2010 3:28 am
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Aug 17, 2010 7:03 pm
Reply with quote

arien wrote:
ps. The SORTIN and SORTOUT file names can be the same.


Not a good idea!
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Aug 17, 2010 7:20 pm
Reply with quote

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
View user's profile Send private message
arien

New User


Joined: 02 Nov 2006
Posts: 43
Location: London

PostPosted: Tue Aug 17, 2010 9:18 pm
Reply with quote

Thanks for the suggestion Craq. I'll redirect output to a different PS.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts Help needed to assemble IMS sample co... ABENDS & Debugging 4
No new posts RABBIT HOLE NEEDED - "Live"... All Other Mainframe Topics 0
No new posts Mainframe profiles needed @ Cognizant Mainframe Jobs 0
No new posts COBOL Student learning COBOL File Han... COBOL Programming 3
Search our Forums:

Back to Top