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: 2088
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: 8614
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 Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am

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