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
 

 

Can we insert the sequential dataset records to a DB2 table?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Suja K

New User


Joined: 03 Mar 2008
Posts: 16
Location: Hyderabad

PostPosted: Fri Feb 20, 2009 12:26 pm    Post subject: Can we insert the sequential dataset records to a DB2 table?
Reply with quote

Could anyone please tell me if we can insert the records from a sequential dataset directly into a table in one PROC SQL step?

When i searched i only got the code for which the literals are given rather than the program variables.

Could you please give me the sample code as well.

=============
Thanks in advance,
Suja
Back to top
View user's profile Send private message

Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Fri Feb 20, 2009 1:57 pm    Post subject:
Reply with quote

Suja,
Quote:
... PROC SQL step?

What do you mean by this?

You can use IBM Load utility or BMC Load plus or some other third party utilites to insert the data set records into table... even your own program will do it.
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: Fri Feb 20, 2009 9:50 pm    Post subject:
Reply with quote

Hello,

Suggest you search the forum for "LOAD" rather than "INSERT".

Insert typically refers to single row inserting (even if many qsam records are read, each insert is for one row). Load typically refers to a bulk of data, rather than one row at a time.

If you find something that is not clear, post what youfound and your question - someone will be able to clarify.
Back to top
View user's profile Send private message
Suja K

New User


Joined: 03 Mar 2008
Posts: 16
Location: Hyderabad

PostPosted: Sat Feb 21, 2009 4:12 pm    Post subject:
Reply with quote

I have already tried the DBLOAD utility in SAS.

But the column name of the DB2 table to be inserted is more than 8 characters and the SAS variable name cannot be more than 8.

So the assignment is failing. can anyone tel me a remedy for that?

IS there any other option?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Sat Feb 21, 2009 5:40 pm    Post subject:
Reply with quote

Quote:
and the SAS variable name cannot be more than 8.
Which version of SAS are you running? This is not true in SAS 9 -- the limit is now 32 characters for a variable name -- and IIRC this has been true for some time; since 8.2 or maybe earlier?
Back to top
View user's profile Send private message
Suja K

New User


Joined: 03 Mar 2008
Posts: 16
Location: Hyderabad

PostPosted: Tue Feb 24, 2009 3:49 pm    Post subject:
Reply with quote

the version is SAS 9.1.3.

Below is the code

DATA XYZ;
INFILE file1;
INPUT @001 LEVEL $6.
@008 LEVEL_DESC $30.;
ERROR: The variable named LEVEL_DESC contains more than 8 characters.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Tue Feb 24, 2009 4:13 pm    Post subject:
Reply with quote

It's not complaining about the variable name, it's complaining about the variable. SAS character variables are 8 bytes in length unless you use a LENGTH statement to state otherwise:
Code:
DATA XYZ;
INFILE file1;
LENGTH LEVEL_DESC $ 30 ;
INPUT @001 LEVEL $6.
@008 LEVEL_DESC $30.;
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
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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