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: 646
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: 1722
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: 646
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: 1239
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: 642
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: 989
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: 1746
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: 10210
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: 1623
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: 989
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: 646
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: 10210
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: 1623
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: 1746
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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


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