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



IBM's Command List programming language & Restructured Extended Executor

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

Postby NicC » Thu Mar 27, 2014 2:24 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby samurai » Thu Mar 27, 2014 6:23 pm

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
samurai
 
Posts: 30
Joined: Tue Mar 18, 2014 3:29 pm
Has thanked: 6 times
Been thanked: 0 time

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

Postby Pedro » Thu Mar 27, 2014 9:05 pm

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.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Previous

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post