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

Unload JCL using utility IKJEFT01


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

New User


Joined: 01 Sep 2009
Posts: 15
Location: CHENNAI

PostPosted: Wed Oct 21, 2009 1:29 pm
Reply with quote

Hi,

I unloaded the table with a unload jcl using utility IKJEFT01. The integer values in the table were unloaded as some junk values. Is there any utility to unload the integer values from the table as such??

Thanks,
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 21, 2009 2:10 pm
Reply with quote

Define junk values
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Oct 21, 2009 2:19 pm
Reply with quote

Generate the DCLGEN for the table and then compare it with unloaded dataset.

By that I think you will get your answer.
Back to top
View user's profile Send private message
Steve Davies

New User


Joined: 15 Oct 2009
Posts: 32
Location: UK

PostPosted: Wed Oct 21, 2009 2:27 pm
Reply with quote

By saying you are using IKJEFT01 to unload a table, do you really mean you are using the DSNTIAUL unload utility?

Perhaps post your JCL. Do you know how to look at the integer fields in HEX in your output file? Are you expecting them to be in display format?
Back to top
View user's profile Send private message
janani vs

New User


Joined: 01 Sep 2009
Posts: 15
Location: CHENNAI

PostPosted: Wed Oct 21, 2009 2:47 pm
Reply with quote

I am using DSNTIAUL unload utility. I want the attributes defined in the table as integer to be unloaded in readable format.
It was unloaded as
±^
°
þ5
þÕ
þ0
þ6
þ6
±ê
þ5
þ5
þ6
±ê
þÔ
þ5

Thanks,
Back to top
View user's profile Send private message
Steve Davies

New User


Joined: 15 Oct 2009
Posts: 32
Location: UK

PostPosted: Wed Oct 21, 2009 2:55 pm
Reply with quote

You have an SQL statement as input then, like

//SYSIN DD *
SELECT * FROM TABLE.NAME ;

I think (I may be wrong as I'm doing this from memory) you'll have to select each column by name and for the integer columns say

CHAR(integer_column_name),

apologies if I'm wrong....
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Oct 21, 2009 3:05 pm
Reply with quote

janani vs,

show the control cards that you are using.

second request.
Back to top
View user's profile Send private message
janani vs

New User


Joined: 01 Sep 2009
Posts: 15
Location: CHENNAI

PostPosted: Wed Oct 21, 2009 3:53 pm
Reply with quote

If I use CHAR(integer_column_name) and select every column in the table individually, then the jcl becomes static i cannot use that jcl to unload some other tables.

Thanks,
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Oct 21, 2009 3:56 pm
Reply with quote

Hello Janani,

You need to anyways changed the jcl as per Table. Its better to put control card in dataset instead of instream.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Oct 21, 2009 3:58 pm
Reply with quote

Quote:
then the jcl becomes static i cannot use that jcl to unload some other tables.


if the table name changes something must be changed in Jour jcl, do You agree ?

and You must make a decision,
keep the control statements simple, easily modified for a different table..
or have the data unloaded in a more understandable format ...

the choice is only Yours, no reason to complain afterwards
Back to top
View user's profile Send private message
janani vs

New User


Joined: 01 Sep 2009
Posts: 15
Location: CHENNAI

PostPosted: Wed Oct 21, 2009 4:04 pm
Reply with quote

hi,

this is the jcl am using,

//UNLOAD2 JOB 'UNLOAD','UNLOAD',CLASS=2,MSGCLASS=X,
// MSGLEVEL=(1,1),NOTIFY=&SYSUID
//STEP1 EXEC PGM=IKJEFT1B,DYNAMNBR=20,TIME=120,REGION=3072K
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//REPORT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(db2 subsystem)
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) LIB('db2 subsystem.RUNLIB.LOAD') -
PARMS('SQL')
//SYSPRINT DD SYSOUT=*
//SYSPUNCH DD DUMMY
//SYSREC00 DD DSN=dataset name,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(200,200),RLSE),
// UNIT=SYSDA
//SYSIN DD *
SELECT * FROM tablename;
/*

Thanks,
Back to top
View user's profile Send private message
janani vs

New User


Joined: 01 Sep 2009
Posts: 15
Location: CHENNAI

PostPosted: Wed Oct 21, 2009 4:29 pm
Reply with quote

hi,
this condition CHAR(integer_column_name)
works.But what if one is unaware of the column names and there definition(ie whether it is a integer or not) of the table.

thanks,
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Oct 21, 2009 4:43 pm
Reply with quote

Hi Janani,

Then one check the table structure either using Admin Tool or Sysibm table or dclgen's .
Back to top
View user's profile Send private message
janani vs

New User


Joined: 01 Sep 2009
Posts: 15
Location: CHENNAI

PostPosted: Wed Oct 21, 2009 5:10 pm
Reply with quote

Hi Ekta,

yeah in DCLGEN, i can know about the column names and definitions. But what if one does not about anything and just knows the table name.

thanks,
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Oct 21, 2009 5:14 pm
Reply with quote

Then One can check in DCLGEN , or in any Admin tool or cataloge tables
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Wed Oct 21, 2009 5:33 pm
Reply with quote

janani vs wrote:
But what if one does not about anything and just knows the table name.
Then s/he must not touch that table...grin
Back to top
View user's profile Send private message
Steve Davies

New User


Joined: 15 Oct 2009
Posts: 32
Location: UK

PostPosted: Wed Oct 21, 2009 5:44 pm
Reply with quote

JANANI V S

Well, if this is not a good solution for you then you'd better start learning how to look at binary fields in your unload dataset. Here's a start....... 'SET HEX ON'

It doesn't sound like a difficult problem. You just need to decide what you want to do. How can you not know the column names of a table? There are many places to look to find those out.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Wed Oct 21, 2009 8:32 pm
Reply with quote

I think he means : What if the control card should be generated for any given table.
Generating "select * from table" is a lot easier than generating a select with all columns (with or without char() ).

Maybe you shouldn't try to use dsntiaul , but look at the possibilities of UNLOAD DELIMITED
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 21, 2009 9:03 pm
Reply with quote

Hello,

Where is the unloaded data to be used?

If by some other mainframe process, there is no need for the data to be readable by human eyes. . . The data as unloaded is perfectly usable.
Back to top
View user's profile Send private message
Steve Davies

New User


Joined: 15 Oct 2009
Posts: 32
Location: UK

PostPosted: Wed Oct 21, 2009 9:29 pm
Reply with quote

GuyC wrote:
I think he means : What if the control card should be generated for any given table.
Generating "select * from table" is a lot easier than generating a select with all columns (with or without char() ).

Maybe you shouldn't try to use dsntiaul , but look at the possibilities of UNLOAD DELIMITED


Perhaps 'janaini vs' could confirm this. To me it sounds like this person has one unload JCL member that is edited each time a table requires to be unloaded. So it is easy to change the table name before submitting the job. Adding all the column names would require some effort.

The purpose of why the table is unloaded would be good to know. If it is to be read by another mainframe process, why do the integer fields need to be in a displayable format? (as mentioned in the post above)

Perhaps 'janaini vs' could say why the integer fields are needed in displayable format, this will help us all give a valid solution.
Back to top
View user's profile Send private message
janani vs

New User


Joined: 01 Sep 2009
Posts: 15
Location: CHENNAI

PostPosted: Mon Oct 26, 2009 11:09 am
Reply with quote

Hi everybody,

Thanks for your response.
Actually I need the integer fields to be displyed in a readable format.

Thanks,
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Oct 26, 2009 4:00 pm
Reply with quote

Quote:
Actually I need the integer fields to be displyed in a readable format


talk about pulling teeth
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 26, 2009 7:14 pm
Reply with quote

Hello,

Quote:
Actually I need the integer fields to be displyed in a readable format.

Quote:
talk about pulling teeth


Why? Suggest you use the process as it exists or write a more suitable custom process (and yup, that will surely take some effort).
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 Load new table with Old unload - DB2 DB2 6
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts REASON 00D70014 in load utility DB2 6
No new posts changing defaults in db2 admin - Unlo... DB2 0
Search our Forums:

Back to Top