IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Write the contents of a variable to a PS file


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
PrabakarV

New User


Joined: 21 Dec 2007
Posts: 88
Location: My Desk

PostPosted: Tue Oct 06, 2009 6:19 pm
Reply with quote

Hi,

I have a variable like this below....

Code:
var1 = " hi this is query1 ",
           " this is query2",
           " this is query 3 too"


i need to write it to a ps file. i can able to write it line by line by pushing... if i want to write var1 in single execio write what is the command.... other than execio is there anyway?

can anyone help me... Thanks...
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Tue Oct 06, 2009 7:36 pm
Reply with quote

What have you tried?

You should be able to concatenate the long string as in your example, then
Code:
PUSH var1
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Oct 06, 2009 7:43 pm
Reply with quote

Not really sure what you are asking here.

With the continuation comma at the end of each line, VAR1 is one variable which contains the whole of the text that you have put across three lines.
Back to top
View user's profile Send private message
PrabakarV

New User


Joined: 21 Dec 2007
Posts: 88
Location: My Desk

PostPosted: Wed Oct 07, 2009 10:07 am
Reply with quote

Thanks Pedro & Expat...

I have tried push command earlier... my ps file file lrecl is 80... after push the write does the one line wirting only... so that i am getting a bit of it...

now i under stand as Expat said it is a one line so i need to break it into pieces....

is there any way i can write them line by line as displayed above in my code...

simply sayin i need them in ps as it is code above (three lines )... is possible thru rexx... since i am new to rexx i need to learn a lot... Thanks...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 07, 2009 7:35 pm
Reply with quote

Hello,

Instead of using only var1 for the "whole string", use var1, var2, and var3. . .
Back to top
View user's profile Send private message
PrabakarV

New User


Joined: 21 Dec 2007
Posts: 88
Location: My Desk

PostPosted: Thu Oct 08, 2009 5:03 pm
Reply with quote

Thanks Dick.... while starting to do it, i tried with that option only and it worked... i am just trying out in different ways...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top