Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SHIFT - fieldsymbol

Former Member
0 Likes
1,078

Hello,

In my program I have to use SHIFT inorder to shift the contents of the field symbol deleting the leading spaces.

Field symbol will be assigned of any type(c,n,d,P,).

Problem :-

When field symbol is assigned with a decimal value, The code short dumps.

Is there any other command which gives the same functionality. Or is there some thing i have to modify with SHIFT. Please let me know the solution.

Thanks

SDN powered

Hello,

In my program I have to use SHIFT inorder to shift the contents of the field symbol deleting the leading spaces.

Field symbol will be assigned of any type(c,n,d,P,).

Problem :-

When field symbol is assigned with a decimal value, The code short dumps.

Is there any other command which gives the same functionality. Or is there some thing i have to modify with SHIFT. Please let me know the solution.

Thanks

SDN powered

7 REPLIES 7
Read only

eddy_declercq
Active Contributor
0 Likes
965
Read only

0 Likes
965

Hi Eddy,

Condsense too creating a dump for decimals

Thanks

SDN powered

Read only

0 Likes
965

Hi,

Condense is used for strings.

Eddy

Read only

Former Member
0 Likes
965

don't give data type for ur field symbol, for example field-symbol <fs>.

u can use this field symbol for any data type.

Read only

andreas_mann3
Active Contributor
0 Likes
965

hi,

use sth like this:

DESCRIBE FIELD <f> TYPE z.

  IF z = 'C'.
   shift <f> ....    
  ENDIF.

A.

Read only

Former Member
0 Likes
965

Hi,

use condense to remove leading spaces

condense v_qty.

Regards

amole

Read only

0 Likes
965

That's funny, it does dump for me at all.



report zrich_0001 .

data: c(10) type c value '0000012345',
      p type p decimals 2 value '12345.67',
      n(4) type n value '0003'.


field-symbols: <fs>.


assign c to <fs>.
shift <fs> left deleting leading '0'.
write:/ <fs>.


assign p to <fs>.
shift <fs> left deleting leading '0'.
write:/ <fs>.


assign n to <fs>.
shift <fs> left deleting leading '0'.
write:/ <fs>.


Regards,

Rich Heilman