How to convert lower to uppercase using Easytrieve product?

Document ID : KB000050484
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

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

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.EZTP.CAILIB,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 ' '      
//*