Alex_Castro

Commodore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-17
18:21
530 views
Micro Focus Visual Studio Dialog System
Is there any way of moving one character of a string variable into another variable in the Dialog System? For example:
YES-STRING X 3
Y-STRING X 1
The 'YES-STRING' contains the word "YES" and I would like to move the letter 'Y' from the 'YES-STRING' to the 'Y-STRING'. I can do this in the COBOL program by doing the following :
MOVE YES-STRING(1:1) TO Y-STRING.
But can this be done in the dialog? I know the Dialog System can move entire variable such as:
MOVE YEST-STRING Y-STRING
But I want to be able to move just a character of a string to another variable in the Dialog System. Thanks in advance for your help.
- Alex Castro
2 Replies
Chris Glazier

Micro Focus Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-18
13:58
Reference modification does not appear to be supported directly in Dialog System script. Subscripting is but not reference modification. The standard COBOL rules for truncation will apply so if you move a 3 character field to a 1 character field then only 1 character will be moved. If you need to do more extensive formatting then you could always do a callout to a COBOL subprogram that would format the data fields for you and then return to Dialog System script afterwards.
Alex_Castro

Commodore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-18
14:34
Okay, thanks for your response.