Hi James,
DEFINE functions like PARSE and WORD can be nested.
I am reading that the number of forward slashes is fixed in your format.
I think you can do things like:
define REALM as PARSE(PARSE(PARSE(basefield,'/'),'/'),,'/')
define TAIL as PARSE(PARSE(PARSE(basefield,'/'),'/'),'/')
or alternatively
define REALM as WORD(basefield,3,'/')
define TAIL as WORD(basefield,4,'/')
Regards,
------------------------------
Jeroen Tiggelman
Software Development and Level 3 Support Manager IBM Security zSecure Suite
IBM
Delft
------------------------------
Original Message:
Sent: Wed February 15, 2023 06:22 AM
From: James Lumsden
Subject: Parsing field
I have kerblinks in the following formats:
/.../REALM1.XX.COM/abcdefgh
and
/.../REALM2DIFFLEN.XX.COM/lnmopqrst
I need to be able to parse out the various sections of the field - the REALM and the trailing abcdefgh or lmnopqrst.
The realm fields can differ in length, as can the trailing Id.
The manual states:
If the start separator is not specified, the start of the character string bounds the value returned. If
the start separator is specified but not found, the result is missing. If a start separator occurs more
than once, the first occurrence is used to calculate the field value to be returned.
How could I parse these fields accurately and correctly and create variables that contain all the parts of the original key field?
Thanks
------------------------------
James Lumsden
------------------------------