Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Write the contents of a variable to a PS file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Write the contents of a variable to a PS file
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

Senior Member


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

PostPosted: Tue Oct 06, 2009 7:36 pm    Post subject: Reply to: Write the contents of a variable to a PS file
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: 8593
Location: Back in jolly old England

PostPosted: Tue Oct 06, 2009 7:43 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Oct 07, 2009 7:35 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 0 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us