Problem IN DE.FORMAT.PRINT, CALCULATION FUNCTION

  • qq99350
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 9 months ago #9652 by qq99350
IN DE.FORMAT.PRINT, THERE'S CALUCLATION FUNCTION.

AFTER I GET THE 'TOTAL.1' NUMBER

I WANT TO MAKE "TOTAL.1" NUMBER TO A NUMBER WITH PERCENTAGE SIGN.

EX:

TOTAL.1 = 0.66
I TRIED TO PUT % IN 'MASK' IT SHOWS LIKE 0.66%

BUT I WANT A NUMBER 66.67%

Please Log in or Create an account to join the conversation.

More
9 years 9 months ago #9657 by jpb
Setting MASK to % is defined as :
Print "%" after the data

So you have to make your TOTAL.1 look like you want beforehand, e.g.
FIELD..TEXT	"100.00"
CONVERSION 	*,TOTAL.1
MASK		%

Please Log in or Create an account to join the conversation.

  • qq99350
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 9 months ago #9670 by qq99350
When I put "100" in FIELD/"TEXT" and "*,TOTAL.1" in Calculation, , the "100" becomes a TEXT but not a NUMBER..

Therefore, the system shows "CALCULATION.36 TOTAL INVALID FOR TEXT" after I click validate

Please Log in or Create an account to join the conversation.

More
9 years 9 months ago - 9 years 9 months ago #9673 by jpb
Havent tried myself, maybe without quotes, use a I-DESC etc...

And worst you can use a routine :

@xxxxxxx
Where xxxxxxx is a user-created subroutine to carry out customised conversions. The subroutine must exist in PGM.FILE as a type ‘S’ record. The leading ‘@’ character must be entered before the subroutine name or it will not be recognised. The arguments used in calling the subroutine are xxxxxxx (IN.FIELD, HEADER.REC, MV.NO, OUT.FIELD, ERROR.MSG), where
IN.FIELD – unconverted data from calling routine
HEADER.REC – dynamic variable containing current Header record from calling routine
MV.NO – Current value number for carrier address (references Header record) from calling routine
OUT.FIELD – converted data from subroutine
ERROR.MSG - text error message generated by subroutine. If this is not null on return from the subroutine, the calling program will abort the conversion and place the message in the Repair queue.

Last edit: 9 years 9 months ago by jpb.

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #22835 by NHUDA021

Havent tried myself, maybe without quotes, use a I-DESC etc...

And worst you can use a routine :

@xxxxxxx
Where xxxxxxx is a user-created subroutine to carry out customised conversions. The subroutine must exist in PGM.FILE as a type ‘S’ record. The leading ‘@’ character must be entered before the subroutine name or it will not be recognised. The arguments used in calling the subroutine are xxxxxxx (IN.FIELD, HEADER.REC, MV.NO, OUT.FIELD, ERROR.MSG), where
IN.FIELD – unconverted data from calling routine
HEADER.REC – dynamic variable containing current Header record from calling routine
MV.NO – Current value number for carrier address (references Header record) from calling routine
OUT.FIELD – converted data from subroutine
ERROR.MSG - text error message generated by subroutine. If this is not null on return from the subroutine, the calling program will abort the conversion and place the message in the Repair queue.


HOW TO DEBUG CONVERSION ROUTINE OF DE.FORMAT.PRINT?

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • TAFC|R19/R21
More
1 year 2 months ago #22836 by VK
Hi
put there DEBUG statement and start tSM with -DEBUG parameter. Then start your tSA in another session.

Please Log in or Create an account to join the conversation.

Time to create page: 0.126 seconds