Mainframe Scenario Video1 / Interview based questions- 2024 Updated list

Поделиться
HTML-код
  • Опубликовано: 29 окт 2024

Комментарии • 2

  • @mayureedeshmukh5115
    @mayureedeshmukh5115 Месяц назад +1

    Following code can be used to reverse the string after removing trailing spaces.
    MOVE FUNCTION LENGTH(WS-ORG-STRG) TO WS-COUNT.
    DISPLAY WS-COUNT.
    PERFORM VARYING WS-SUB FROM WS-COUNT BY -1 UNTIL WS-SUB = 0
    IF WS-ORG-STRG(WS-SUB:) = ' '
    CONTINUE
    ELSE
    MOVE FUNCTION REVERSE (WS-ORG-STRG(1:WS-SUB)) TO WS-REVRS
    DISPLAY WS-REVRS
    MOVE 1 TO WS-SUB
    END-IF
    END-PERFORM.

  • @babuvamsikiranyarramalla4250
    @babuvamsikiranyarramalla4250 Месяц назад

    Could you please give the code to reverse the words in a string.
    I Like cobol--> cobol like i