IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

can we hardcode a value in db2 load card instead of position


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ram_vizag

Active User


Joined: 21 Aug 2008
Posts: 112
Location: hyd

PostPosted: Wed Feb 28, 2018 11:04 pm
Reply with quote

HI All,

Can we hard code a value instead of giving position?

I have a input file which needs to be loaded into a db2 table of which only few columns to be loaded from file and remaining columns to be hard coded( instead of mentioning starting/ending positions of input file) ?

is this possible and may I know how?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu Mar 01, 2018 1:01 am
Reply with quote

Quote:
I have a input file which needs to be loaded into a db2 table of which only few columns to be loaded from file and remaining columns to be hard coded( instead of mentioning starting/ending positions of input file) ?


Can you not able to produce the load DS by using DFSORT , just take the input and BUILD it according to your syspunch and do a load?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Mar 01, 2018 1:54 am
Reply with quote

ram_vizag wrote:
is this possible and may I know how?
Ram,

Take a look at the CONSTANT keyword in the LOAD statement. This might be possible if your DB2 version allows it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Load new table with Old unload - DB2 DB2 6
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts How to load to DB2 with column level ... DB2 6
No new posts REASON 00D70014 in load utility DB2 6
Search our Forums:

Back to Top