Page 3 of 3

Re: How to insert a new line in a PDS member using REXX..

PostPosted: Thu Mar 27, 2014 2:24 pm
by NicC
If you can create a new topic we can delete the last few posts in this topic. Just use cut and paste to save retyping. You will need to expandon what your requirement is as it is unclear. I think you are trying to update a record - doing the equivalent of the IPSF Edit CHANGE command but I am unsure of this so cannot post a worth-while solution.

Re: How to insert a new line in a PDS member using REXX..

PostPosted: Thu Mar 27, 2014 6:23 pm
by samurai
Hi Nic,

I have tried with the below piece of code and it worked:

STRT = POS(JJJJJ,INP.I)
SAY STRT
DO WHILE STRT > 0
SAY INP.I
LN = LEFT(INP.0,STRT-1)||KKKKK

Re: How to insert a new line in a PDS member using REXX..

PostPosted: Thu Mar 27, 2014 9:05 pm
by Pedro
the below piece of code and it worked:

Doubtful.

I have not actually tried it, but:
1. I question the use of INP.0 in the fifth line. it should be INP.I
2. You probably lose stuff that is at the right of the change text. Rather than POS and LEFT, you should use PARSE to get both the leading text and the trailing text.
3. your code is not complete... I will assume you get out of the DO WHILE somehow.