| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		prog_mario Beginner
 
  Joined: 08 Sep 2007 Posts: 86 Topics: 27
 
  | 
		
			
				 Posted: Mon Jul 19, 2010 12:14 pm    Post subject: How to move high-values in CSP or Visual Age? | 
				     | 
			 
			
				
  | 
			 
			
				How do I move high-values to a variable in CSP or Visual-Age?
 
Thanks | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		kolusu Site Admin
  
 
  Joined: 26 Nov 2002 Posts: 12395 Topics: 75 Location: San Jose
  | 
		
			
				 Posted: Mon Jul 19, 2010 12:21 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				prog_mario, 
 
 
 
Move X'FF' to field name? High-values are only valid for character strings. 
 
 
Kolusu | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		prog_mario Beginner
 
  Joined: 08 Sep 2007 Posts: 86 Topics: 27
 
  | 
		
			
				 Posted: Mon Jul 19, 2010 12:26 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| It's not working. Is there any other way to do that? | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		kolusu Site Admin
  
 
  Joined: 26 Nov 2002 Posts: 12395 Topics: 75 Location: San Jose
  | 
		
			
				 Posted: Mon Jul 19, 2010 12:27 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				 	  | prog_mario wrote: | 	 		  | It's not working. Is there any other way to do that? | 	  
 
 
What do you mean it is NOT working? Error message? | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		prog_mario Beginner
 
  Joined: 08 Sep 2007 Posts: 86 Topics: 27
 
  | 
		
			
				 Posted: Mon Jul 19, 2010 12:32 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				In fact I'm working with Visual Age and when I try to validate the function I get a message of "Instruction text invalid". _________________ The more I learn, the more I want to learn. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		kolusu Site Admin
  
 
  Joined: 26 Nov 2002 Posts: 12395 Topics: 75 Location: San Jose
  | 
		
			
				 Posted: Mon Jul 19, 2010 12:41 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				 	  | prog_mario wrote: | 	 		  | In fact I'm working with Visual Age and when I try to validate the function I get a message of "Instruction text invalid". | 	  
 
 
You need to do a better job of explaining what you are doing. 
 
 
1. How is the variable defined? is it alphanumeric , or numeric? 
 
2. Show us the piece of code where you moving the high-values 
 
3. What is the exact error message with with message ID? | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		dbzTHEdinosauer Supermod
 
  Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
  | 
		
			
				 Posted: Mon Jul 19, 2010 12:44 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				what programming language?  cobol/java/c ? _________________ Dick Brenholtz
 
American living in Varel, Germany | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		prog_mario Beginner
 
  Joined: 08 Sep 2007 Posts: 86 Topics: 27
 
  | 
		
			
				 Posted: Mon Jul 19, 2010 12:50 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				OK.
 
1. variable is defined as CHAR(5) Nonshared.
 
 
2. the code is: 	  | Code: | 	 		  
 
MOVE ' ' TO PEN34W01.FLAG;
 
 
IF PEN34M01.EMPRESA EQ 0;
 
  MOVE 000 TO PENA024.CD-EMPRE-024;
 
ELSE;
 
  MOVE PEN34M01.EMPRESA TO PENA024.CD-EMPRE-024;
 
END;
 
 
IF PEN34M01.PRODUTO EQ " ";
 
  MOVE X'FF' TO PENA024.CD-PROD-024;
 
ELSE;
 
  MOVE PEN34M01.PRODUTO TO PENA024.CD-PROD-024;
 
END;
 
 
IF PEN34M01.SUBSEG EQ 0;
 
  MOVE 000 TO PENA024.CD-SUBSEG-024;
 
ELSE;
 
  MOVE PEN34M01.SUBSEG TO PENA024.CD-SUBSEG-024;
 
END;
 
 
IF PEN34M01.INTER EQ 0;
 
  MOVE 000000 TO PENA024.CD-LOJA-024;
 
ELSE;
 
  MOVE PEN34M01.INTER TO PENA024.CD-LOJA-024;
 
END;
 
 
IF PEN34M01.DT_INICIO = 0;
 
  MOVE 00000000 TO PENA024.DT-INI-VALID-024;
 
ELSE;
 
  MOVE PEN34M01.DT_INICIO TO PEN34W01.DATA10-08;
 
  MOVE PEN34W01.DATA10-8 TO PENA024.DT-INI-VALID-024;
 
END;
 
 | 	  
 
3. The error message code is: Hpt.PL.6.e - The instructions's text on column 6 is invalid.
 
   Note that this is a translation because my VisualAge is in Brazilian Portuguese.
 
 
Hope this can help you help me. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		dbzTHEdinosauer Supermod
 
  Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
  | 
		
			
				 Posted: Mon Jul 19, 2010 1:44 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				how about without the translation?
 
 
we still don't know what 
 
 
PENA024.CD-PROD-024
 
or
 
PEN34M01.PRODUTO
 
 
looks like. _________________ Dick Brenholtz
 
American living in Varel, Germany | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		dbzTHEdinosauer Supermod
 
  Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
  | 
		
			
				 Posted: Mon Jul 19, 2010 1:46 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				are you sure that  X'FF'
 
is the notation necessary to define a 1 char hexidecimal literal? _________________ Dick Brenholtz
 
American living in Varel, Germany | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		dbzTHEdinosauer Supermod
 
  Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
  | 
		
			
				 Posted: Mon Jul 19, 2010 1:56 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				I have coded languages where 'FF'X was the proper notation. _________________ Dick Brenholtz
 
American living in Varel, Germany | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		prog_mario Beginner
 
  Joined: 08 Sep 2007 Posts: 86 Topics: 27
 
  | 
		
			
				 Posted: Mon Jul 19, 2010 2:16 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				PEN34M01 is my screen name and PRODUTO is a field from this screen.
 
PENA024 is my record layout and CD-PROD-024 is a field from this layout.
 
So if PRODUTO is equal spaces what means the user didn't type anything for it, I want to move high-values to my record layout field which is CD-PROD-024.
 
CD-PROD-024 is a CHAR of 5 bytes.
 
About the translation, I just putted the error message into English. _________________ The more I learn, the more I want to learn. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		prog_mario Beginner
 
  Joined: 08 Sep 2007 Posts: 86 Topics: 27
 
  | 
		
			
				 Posted: Mon Jul 19, 2010 2:17 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				By the way I've tried X'FF' and 'FF'X and both leads me to the same error message. _________________ The more I learn, the more I want to learn. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		kolusu Site Admin
  
 
  Joined: 26 Nov 2002 Posts: 12395 Topics: 75 Location: San Jose
  | 
		
			
				 Posted: Mon Jul 19, 2010 2:19 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				prog_mario, 
 
 
Try moving the entire 5 bytes X'FFFFFFFFFF' or FFFFFFFFFF'X whichever is the correct syntax.
 
 
Kolusu | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		prog_mario Beginner
 
  Joined: 08 Sep 2007 Posts: 86 Topics: 27
 
  | 
		
			
				 Posted: Mon Jul 19, 2010 2:30 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Not working either. _________________ The more I learn, the more I want to learn. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		| 
		
		 | 
	
	
		 |