Replace a string with another string with different length



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Replace a string with another string with different length

Postby Devrana » Sun Jan 19, 2025 3:23 pm

Hi All,

I have tried to change a string of length 3 with another string of length 4 but the output is not coming as expected. I have tried with findrep parameter of sort utility but it didn't give the desired result.

Example:

Input:

DEVTEST
DEVUAT
DEVPROD


Expected output:

DEV1EST
DEV1AT
DEV1ROD

Note: postition of start of DEV string in input file is not known.

Please assist. Thanks!
Devrana
 
Posts: 15
Joined: Tue May 17, 2022 12:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Replace a string with another string with different leng

Postby sergeyken » Sun Jan 19, 2025 11:07 pm

JCL has no operations for such manipulation.

Please, choose the forum section for different tools: COBOL? Assembler? PL/I? REXX? SORT? Whatever else?

The important issue: you must present here the exact code of your attempts, plus all input/output/log data of its execution. Otherwise there is no base for any discussion.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 453
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 8 times
Been thanked: 40 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post