View previous topic :: View next topic
|
Author |
Message |
sutirtha mukherjee
New User
Joined: 04 Mar 2008 Posts: 6 Location: Chennai
|
|
|
|
Hi,
Can you please tell me which would be less CPU time consuming
INSPECT REPLACING ALL or INSPECT CONVERTING TO?
Thanks,
Sutirtha |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
INSPECT REPLACING, regardless whether you're using WS or literals, always generates a BALR/CALL to a COBOL run-time routine. This is also true with INSPECT CONVERTING with WS.
However, INSPECT CONVERTING with literals generates a single in-line TR (Translate) instruction and would be the more efficient and less costly method.
Note that I believe the literal-length maximum is 160-bytes, but this should be reviewed and confirmed.
HTH....
Regards,
Bill |
|
Back to top |
|
|
sutirtha mukherjee
New User
Joined: 04 Mar 2008 Posts: 6 Location: Chennai
|
|
|
|
Thanks a lot, Bill
I would be using this INSPECT in a loop 2000 times ...
so inspect converting might save time ... |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
If the area that you're trying to convert is 2000 bytes long, then it would be much more efficient to issue a single INSPECT CONVERTING or INSPECT REPLACING, which may (or would) result in a single BALR/CALL to the COBOL runtime module, but it would be far cheaper than 2000 In-Line TR instructions in a loop.
Can I ask what you're converting "from" and "to"?
Regards,
Bill |
|
Back to top |
|
|
|