Problem IN DE.FORMAT.PRINT, CALCULATION FUNCTION
- qq99350
- Topic Author
- Offline
- New Member
- Posts: 5
- Thank you received: 0
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.
- jpb
- Offline
- Moderator
- retired
- Posts: 2859
- Thank you received: 649
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
- Posts: 5
- Thank you received: 0
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.
- jpb
- Offline
- Moderator
- retired
- Posts: 2859
- Thank you received: 649
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.
Please Log in or Create an account to join the conversation.
- NHUDA021
- Offline
- New Member
- Posts: 1
- Thank you received: 0
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
- Offline
- Platinum Member
- Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
- Posts: 1181
- Thank you received: 157
put there DEBUG statement and start tSM with -DEBUG parameter. Then start your tSA in another session.
Cheers
VK
Please Log in or Create an account to join the conversation.