Page 2 of 3

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

PostPosted: Thu Jan 09, 2014 12:13 am
by Steve Coalbran
YES, VPUT/VGET is probably better :D

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

PostPosted: Thu Jan 09, 2014 2:57 pm
by Steve Coalbran
Thanks Pedro.
I agree, that would be better, don't want stuff lying about on the stack if something goes wrong?! :o
It would be good to see the actual code though, perhaps to give some tips or pointers?

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

PostPosted: Thu Jan 09, 2014 7:32 pm
by santosh bm
@ Steve : I'm getting below errors Steve.
Command not executed
IKJ56500I COMMAND V107 NOT FOUND
IKJ56500I COMMAND V108 NOT FOUND
IKJ56500I COMMAND V109 NOT FOUND
IKJ56500I COMMAND V110 NOT FOUND

My rexx code is as below :
MACRO2 :
ADDRESS DSNREXX                                             
QUEUE v107                                                   
QUEUE v108                                                   
QUEUE v109                                                   
QUEUE v110                                                   
ADDRESS ISPEXEC                                             
"EDIT DATASET("'TEST.REXX.PDS3('ELENAME')'") MACRO(MYMACRO2)"


Macro is as below :
ADDRESS ISPEXEC "CONTROL ERRORS RETURN "     
ADDRESS ISREDIT                               
"MACRO NOPROCESS "                           
PARSE PULL v107                               
PARSE PULL v108                               
PARSE PULL v109                               
PARSE PULL v110                               
"LINE 107 = (V107) "                         
"LINE 108 = (V108) "                         
"LINE 109 = (V109) "                         
"LINE 110 = (V110) "                         
"END "

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

PostPosted: Thu Jan 09, 2014 7:57 pm
by santosh bm
@ pedro :

if i use address ISREDIT "END" instead of "END"
lines are not getting inserted into the pds member. :?

can anyone please adress this issue :

i'm not able to pass the data from rexx code to macro. how to do it ??

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

PostPosted: Thu Jan 09, 2014 8:31 pm
by NicC
Why are you addressing DSNREXX in your MACRO2? Where have you assigned values to v107, v108 etc?

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

PostPosted: Thu Jan 09, 2014 10:21 pm
by Pedro
lines are not getting inserted into the pds member.

The use of "END" to save the data is a default settings. Perhaps you have used the AUTOSAVE OFF command so that you do not use the default setting. Use the PROFILE command to check your editor settings.

If you do not want to implicitly save, then you need to explicitly save it:
"SAVE"
"END"

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

PostPosted: Fri Jan 10, 2014 3:24 am
by Pedro
i'm not able to pass the data from rexx code to macro. how to do it ??

I already mentioned using VPUT and VGET for the SHARED pool.

How to replace the string from the derived variable.

PostPosted: Wed Mar 26, 2014 8:09 pm
by samurai
can anyone tell me how to proceed as i am new to rexx:

i have extracted the string in a variable as

VAR= SUBSTR(INP.I,1,5)

let say it is XXXXX and i need to replace it with YYYYY.

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

PostPosted: Thu Mar 27, 2014 1:14 am
by dick scherrer
Hello,

Why have you replied to a topic that has nothing to do with your question? Possibly i am missing something . . . :?

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

PostPosted: Thu Mar 27, 2014 12:34 pm
by samurai
Sorry as i am new to this forum, mistakenly posted. also not able to delete that.. :(