Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

STRRLU

Status
Not open for further replies.

debdas

MIS
Feb 12, 2003
35
IN
I have one field name "mrrpqt" its a quantity field , datatype is Packed (15,6) Numeric. If the value of the field is say 1.000000 it is showing 000000000100000 on output file through STRRLU.

How do i convert it into 1.00 ???
 
Try looking at the EDTCDE and EDTWRD keywords. These wiil format the field to your requirements.

Hope this helps.

--------------------------------
If it ain't broke, don't fix it!
 
Can you please let me know with example how to use EDTCDE or EDTWRD

Thanks in advance

 
EDTCDE

If you enter the EDTCDE keyword and press F1, a list of the edit codes and what they do is listed.

For your field of 15,6 with a value of 1234.123456 the following will occur

edit code result
1 1,234.123456
2 000,001,234.123456
3 1234.123456
4 000001234.123456

Edit codes A-Q are the same but with a negative sign. W and Y are for use with date field, and Z is the same as 3 but without the decimal points.

EDTWRD

Edit words do the same as EDTCDE but you have to define what the edit will be. For example to mimic edit code 1 you would type 'bbb,bbb,bb0.bbbbbb', where b is blank. For edit code J this would become 'bbb,bbb,bb0.bbbbbb-'. Edit code 3 would be 'bbbbbbbb0.bbbbbb', whilst 4 would be '0bb,bbb,bbb.bbbbbb'.

EDTWRD 'b0/bb/bb' is the same as EDTCDE Y.

In my view using EDTWRD is more flexible than EDTCDE but some people prefer EDTWRD and some EDTCDE, it's a matter of choice. To really get to grips with editing I suggest you just play with the different EDTCDE's and EDTWRD's in different length fields in a test PRTF.

Hope this helps.

--------------------------------
If it ain't broke, don't fix it!
 
Thanks dear for yr valuable suggestions

Debabrata Das
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top