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

MOVE ONE X(03) VARIABLE TO HOST VARIBLE


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dileep.james
Warnings : 1

New User


Joined: 22 Apr 2005
Posts: 4
Location: mumbai

PostPosted: Tue Aug 02, 2005 3:46 pm
Reply with quote

hi

i want to move X(03) to a DB2 hostvariable in the form of


10 PROD-ID.
49 PROD-ID-LEN PIC S9(04) usage comp.
49 PROD-ID-TEXT PIC X(20).

hOW TO MOVE X(03) VARABLE TO THAT HOST VARIBLE

WHEN I MOVED X(03) VARABLE TO PROD-ID-TEXT PIC X(20).
IT WILL RUN SUCESSFULLY

BUTT DATA DIDN'T ENTER INTHE TABLE

WHEN I MOVE X(03) VARABLE TO PROD-ID DIRECTLY ,IT GIVES
ERROR WHEN COMPLE THAT PROGRAM

CAN ANY ONE HELP ME
Back to top
View user's profile Send private message
kvivek

New User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Tue Aug 02, 2005 10:35 pm
Reply with quote

Quote:
WHEN I MOVED X(03) VARABLE TO PROD-ID-TEXT PIC X(20).
IT WILL RUN SUCESSFULLY

For varchar variables the first two bytes will identify the length of the text stored and you need to move the length in this location. Could you try
Code:
MOVE LENGTH OF <X(03) VARIABLE> TO  PROD-ID-LEN


Regards,
Vivek
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 -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts access the last host command CLIST & REXX 2
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top