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 Steve Coalbran » Thu Jan 09, 2014 12:13 am

YES, VPUT/VGET is probably better :D
Steve
User avatar
Steve Coalbran
 
Posts: 138
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 13 times
Been thanked: 1 time

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

Postby Steve Coalbran » Thu Jan 09, 2014 2:57 pm

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?
Steve
User avatar
Steve Coalbran
 
Posts: 138
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 13 times
Been thanked: 1 time

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

Postby santosh bm » Thu Jan 09, 2014 7:32 pm

@ 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 "
santosh bm
 
Posts: 14
Joined: Tue Oct 29, 2013 11:53 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby santosh bm » Thu Jan 09, 2014 7:57 pm

@ 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 ??
santosh bm
 
Posts: 14
Joined: Tue Oct 29, 2013 11:53 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Thu Jan 09, 2014 8:31 pm

Why are you addressing DSNREXX in your MACRO2? Where have you assigned values to v107, v108 etc?
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 Pedro » Thu Jan 09, 2014 10:21 pm

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"
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

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

Postby Pedro » Fri Jan 10, 2014 3:24 am

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.
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

How to replace the string from the derived variable.

Postby samurai » Wed Mar 26, 2014 8:09 pm

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.
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 dick scherrer » Thu Mar 27, 2014 1:14 am

Hello,

Why have you replied to a topic that has nothing to do with your question? Possibly i am missing something . . . :?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby samurai » Thu Mar 27, 2014 12:34 pm

Sorry as i am new to this forum, mistakenly posted. also not able to delete that.. :(
samurai
 
Posts: 30
Joined: Tue Mar 18, 2014 3:29 pm
Has thanked: 6 times
Been thanked: 0 time

PreviousNext

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post