How to convert lower to uppercase using Easytrieve product
search cancel

How to convert lower to uppercase using Easytrieve product

book

Article ID: 50484

calendar_today

Updated On:

Products

Easytrieve Report Generator

Issue/Introduction

There is no Easytrieve command to do this. However, an example of how to code this using Easytrieve is provided below.

 

Environment

Easytrieve Report Generator, release 11.6

Resolution

Solution:

Here is an example of how to convert lower to uppercase:

//Jobname JOB 'Account',CLASS=A,MSGCLASS=X,   
// MSGLEVEL=(1,1),NOTIFY=&SYSUID   
//EZT001     EXEC PGM=EZTPA00   
//STEPLIB    DD DSN=your.EZT.CBAALOAD,DISP=SHR   
//SYSPRINT   DD SYSOUT=*      
//INFILE     DD * 
  abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ   
//SYSIN      DD *   
  FILE INFILE   
  INFILE-STRING  1  80  A   
  INFILE-B       1   1  B OCCURS 80   
  S1             W   2  P 0   
  JOB   
  DISPLAY ' INPUT: ' INFILE-STRING   
  S1 = 1   
  DO WHILE S1 LE 80   
  IF INFILE-B(S1) GE 129 +   
  AND INFILE-B(S1) LE 169   
  INFILE-B(S1) = INFILE-B(S1) + 64   
  END-IF   
  S1 = S1 + 1   
  END-DO   
  DISPLAY 'OUTPUT: ' INFILE-STRING   
  DISPLAY ' '      
//*