SQL INSERT with VARCHAR Column



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

SQL INSERT with VARCHAR Column

Postby vhindizon » Wed Apr 01, 2015 2:07 am

I need to create a job using Easytrieve that reads a file and inserts the record in a DB2 table.
The file contains a description field with 400 chars and would be inserted in DESC VARCHAR (400) column in a DB2 table. The description has variable length. I was able to insert but it is filling out all 400 chars (trailing spaces). Is there a way i can code to insert to the table with variable length?
Thanks.
vhindizon
 
Posts: 2
Joined: Wed Apr 01, 2015 2:01 am
Has thanked: 0 time
Been thanked: 0 time

Re: SQL INSERT with VARCHAR Column

Postby BillyBoyo » Wed Apr 01, 2015 3:31 am

Is there nothing in your Easytrieve Plus documentation? If you wanted to do this is COBOL, what would you do? The same should work.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: SQL INSERT with VARCHAR Column

Postby vhindizon » Wed Apr 01, 2015 4:46 am

i know the steps for cobol where the dclgen has the length and text variables for the varchar column. I
can get the actual length of the field but i do not how to setup of declare the varchar variable in easytrieve and how the insert sql would look like. thanks.
vhindizon
 
Posts: 2
Joined: Wed Apr 01, 2015 2:01 am
Has thanked: 0 time
Been thanked: 0 time


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post