Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
MOVE ONE X(03) VARIABLE TO HOST VARIBLE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
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    Post subject: MOVE ONE X(03) VARIABLE TO HOST VARIBLE
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us