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
 

 

Need Rexx Program to Load in to DB2 Table
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Hareesh Verma

New User


Joined: 08 Mar 2016
Posts: 8
Location: india

PostPosted: Tue Sep 20, 2016 2:59 pm    Post subject: Need Rexx Program to Load in to DB2 Table
Reply with quote

Hi

I Need REXX Program to Read from Sequential File and load that data in to DB2 Table.

If any One help me Please let me know.

Thanks in Advance.

Regards
Hareesh
Back to top
View user's profile Send private message

daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Tue Sep 20, 2016 4:44 pm    Post subject:
Reply with quote

Let me start out by saying I am a Rexx guy. I use it for many things.

But loading data into a DB2 table from a sequential file, would be way down on my list of practical uses.

Why not use a DB2 utility? Much more efficient and easy to write cards for.

Next, I need a new car. If any One help me, please let me know.

We have the same chance at getting help asking this way.

If you give some specifics, perhaps some help is possible, but right now, not so much.
Back to top
View user's profile Send private message
Kerry Ropar

New User


Joined: 14 Sep 2016
Posts: 25
Location: Australia

PostPosted: Tue Sep 20, 2016 4:53 pm    Post subject:
Reply with quote

Hareesh,

Your problem statement is fairly wide open. May I please request you to provide more details on selecting this approach. Is there any further restrictions which forced you to select rexx when this can be done with simple jcl.
Back to top
View user's profile Send private message
Hareesh Verma

New User


Joined: 08 Mar 2016
Posts: 8
Location: india

PostPosted: Tue Sep 20, 2016 5:19 pm    Post subject:
Reply with quote

Actually I am not Allowed to use Load Utility. Writing a Cobol Program Means Too Many Components(PROG,PROC,PLAN) etc which can be completed with a single Parm using REXX.
Back to top
View user's profile Send private message
Kerry Ropar

New User


Joined: 14 Sep 2016
Posts: 25
Location: Australia

PostPosted: Tue Sep 20, 2016 5:27 pm    Post subject:
Reply with quote

Quote:
Actually I am not Allowed to use Load Utility.


Can you please let me know what you are thinking here. May be I am too new to Mainframe, but if not load utility, then how do you expect rexx to load into table? Do you want Insert statements?

Quote:
Writing a Cobol Program


We are not advising this. We are suggesting load utility which can be executed directly using JCL.
Back to top
View user's profile Send private message
Hareesh Verma

New User


Joined: 08 Mar 2016
Posts: 8
Location: india

PostPosted: Tue Sep 20, 2016 5:30 pm    Post subject:
Reply with quote

Yes By using Insert Statements.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Tue Sep 20, 2016 5:54 pm    Post subject:
Reply with quote

Why not read up in the SQL manual about how to write DB2/Rexx programs?
Yes, the required information is there - an entire chapter. I know because that is what I did.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Tue Sep 20, 2016 5:55 pm    Post subject:
Reply with quote

How familiar are you with Rexx?

The Rexx/DB2 interface is not the best. It is not as easy to work with as you think.

Your profile says you are a beginner.

I have 30 years experience with Rexx, Cobol, DB2, JCL etc...

I would not choose Rexx to do this. I would choose a DB2 utility first, then Cobol next.

You come to this forum for advice, and now you have it.

The person who said you can not use a utility should first be fired, then shot.
icon_wink.gif
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Tue Sep 20, 2016 6:50 pm    Post subject:
Reply with quote

Quote:
first be fired, then shot.

Rather than shot then fired. Easier to drag them out the door that way.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Tue Sep 20, 2016 7:21 pm    Post subject:
Reply with quote

My first choice would be the DB2 LOAD utility. So would my second and third choices. Inserting data via DSNREXX calls is very inefficient and would be a poor choice for more than a handful of rows.

If you must use Rexx, another approach is to read your input file and format SQL INSERT statements that you can run in a subsequent step via DSNTEP2. Even this approach is not optimal; you can do the same thing with relatively little effort (and much more efficiently) using DFSORT to format the INSERT statements.
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Tue Sep 20, 2016 10:58 pm    Post subject:
Reply with quote

Direct the moronic idiot who told you not to use the LOAD utility to this page...
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Tue Sep 20, 2016 11:43 pm    Post subject:
Reply with quote

Hareesh Verma wrote:
Actually I am not Allowed to use Load Utility. Writing a Cobol Program Means Too Many Components(PROG,PROC,PLAN) etc which can be completed with a single Parm using REXX.


I note that you have not said why you are not allowed to use the LOAD utility. If there is a sound reason, then we may be able to assist you in a way that does not involve writing a Rexx exec (which Messrs. Leahy and Porcelan have told to you to avoid). If it's an arbitrary "It's the requirement!", then I recommend that you push back.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Sep 20, 2016 11:59 pm    Post subject: Reply to: Need Rexx Program to Load in to DB2 Table
Reply with quote

IMO topics which develop like this one,
- requirements/ solutions against any good judgement and good practices-
should be locked after a while.

that what I will probably do shortly.
no reason to waste time on moronic requirements
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Wed Sep 21, 2016 12:38 am    Post subject:
Reply with quote

Quote:
Writing a Cobol Program Means Too Many Components(PROG,PROC,PLAN) etc which can be completed with a single Parm using REXX
So what? Develop the components. I don't think it will take more than 30 minutes.
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Wed Sep 21, 2016 1:23 am    Post subject:
Reply with quote

Rohit Umarjikar wrote:
Quote:
Writing a Cobol Program Means Too Many Components(PROG,PROC,PLAN) etc which can be completed with a single Parm using REXX
So what? Develop the components. I don't think it will take more than 30 minutes.

+1

I once wrote a small CICS inquiry system, made up of five PL/I programs and two BMS maps, before my coffee break. ;)
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Wed Sep 21, 2016 1:41 am    Post subject:
Reply with quote

It think the OP has been scared off anyway. icon_neutral.gif
Back to top
View user's profile Send private message
Kerry Ropar

New User


Joined: 14 Sep 2016
Posts: 25
Location: Australia

PostPosted: Wed Sep 21, 2016 4:41 am    Post subject:
Reply with quote

Terry Heinze wrote:
Quote:
first be fired, then shot.

Rather than shot then fired. Easier to drag them out the door that way.


May be he meant to save work-site compensation claims as well icon_lol.gif

Anyways, unless the user gives us a reason to follow this approach, we all should just wait to hear back for a while (just a suggestion)
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Sep 21, 2016 5:24 am    Post subject: Reply to: Need Rexx Program to Load in to DB2 Table
Reply with quote

Quote:
Anyways, unless the user gives us a reason to follow this approach


we will get as usual the stupid reply that' s the requirement
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Wed Sep 21, 2016 9:20 am    Post subject:
Reply with quote

Quote:
I have 30 years experience with Rexx, Cobol, DB2, JCL etc...
thats my exact age icon_eek.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Wed Sep 21, 2016 10:08 am    Post subject:
Reply with quote

Rohit Umarjikar wrote:
Quote:
I have 30 years experience with Rexx, Cobol, DB2, JCL etc...
thats my exact age icon_eek.gif

So a number of us have been in this racket long than you've been alive icon_wink.gif
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 -> CLIST & REXX 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 I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am


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