2006 Jun 01 11:34 PM
Hi ,
Iam extracting internal order details in a file .Iam getting internal order number leading 6 zeros .I need to delete that 6 zeros .how can i do that one.
thanks,
madhu
Hi ,
Iam extracting internal order details in a file .Iam getting internal order number leading 6 zeros .I need to delete that 6 zeros .how can i do that one.
thanks,
madhu
2006 Jun 01 11:38 PM
2006 Jun 02 12:03 AM
or you can also use the no-zero opion..
write <fl> to <fld> no-zero.
Regards,
Suresh Datti
2006 Jun 02 12:32 AM
Simplest option is
MOVE <field-name> left DELETING leading '0'.
If this helps, award points suitably.
2006 Jun 02 1:07 AM
2006 Jun 02 1:10 AM
Hi Priya,
try shift statement to delete leading 0's.
shift field_name left deleting leading '0'.
Cheers,
Vikram
Please reward for helpful replies!!
2006 Jun 02 4:01 AM
Hi, As others said, you could use shift. here is the syntax:
SHIFT c LEFT DELETING LEADING c1.
Also, here are other variants of shift:
1. SHIFT c.
2. SHIFT c BY n PLACES.
3. SHIFT c UP TO c1.
4. SHIFT c RIGHT DELETING TRAILING c1.
Like all string processsing statements, you can only use character-type operands here.
If the type of an operand is not STRING, the operand is treated like a type C field, regardless of its actual type, even though no actual conversion takes place.
Regards!
2006 Jun 02 5:38 AM
HI
GOOD
NO-ZERO Output format: No leading zeros (WRITE)
THANKS
MRUTYUN
2006 Jun 02 5:40 AM
Hi Priya ,
according to your post I assum that allways 6 zeros are leading your datastring...
If it is so you could use:
MOVE data_string+6 to target_string .
The use of:
MOVE .... left DELETING leading '0'
and
Shift the_field left deleting leading '0'
or something else "automatic" may remove a valid ZERO
in position 7 (or more)
(wich is the first position of your data) !
Regards
Rainer
Some points would be nice if that helped a bit.