Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Unload JCL using utility IKJEFT01
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Unload JCL using utility IKJEFT01
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: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 21, 2009 2:10 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Wed Oct 21, 2009 3:56 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Oct 21, 2009 3:58 pm    Post subject: Reply to: unload jcl
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    Post subject:
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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Wed Oct 21, 2009 4:43 pm    Post subject:
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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Wed Oct 21, 2009 5:14 pm    Post subject:
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

Senior Member


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

PostPosted: Wed Oct 21, 2009 5:33 pm    Post subject:
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    Post subject:
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: 1278
Location: Belgium

PostPosted: Wed Oct 21, 2009 8:32 pm    Post subject:
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

Site Director


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

PostPosted: Wed Oct 21, 2009 9:03 pm    Post subject:
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    Post subject:
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts Any docs / links for isub- cobol comp... SRICOBSAS COBOL Programming 4 Fri Aug 26, 2016 2:35 pm
No new posts "DFSRRC00 vs IKJEFT01" for ... arunsoods All Other Mainframe Topics 5 Fri Aug 12, 2016 9:54 pm
No new posts DB2 Unload format options Susanta DB2 2 Fri Aug 12, 2016 5:42 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us