Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DSNUPROC - No CHARDEL needed

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: DSNUPROC - No CHARDEL needed
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    Post subject: Resolution -- a way around
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: 6968
Location: porcelain throne

PostPosted: Tue Aug 17, 2010 3:28 am    Post subject:
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    Post subject: Re: Resolution -- a way around
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

Senior Member


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

PostPosted: Tue Aug 17, 2010 7:20 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts Help Needed with View Direct shailesh_do CA Products 2 Wed Jul 13, 2016 10:39 am
No new posts unload thetable data using DSNUPROC ... Madhusudhan Prahlad DB2 4 Tue Dec 01, 2015 5:04 pm
No new posts Information needed on using the COBAN... venugopal.dondla COBOL Programming 5 Thu Oct 08, 2015 3:34 pm
No new posts Help needed in Conditional statement ... vinu78 DB2 5 Tue Sep 15, 2015 10:14 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us