MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem in writing to a Output file : REXX

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
mask-of-zorro
Beginner


Joined: 19 Nov 2005
Posts: 23
Topics: 10

PostPosted: Sat Mar 04, 2006 12:47 am    Post subject: Problem in writing to a Output file : REXX Reply with quote

Hi everyone,

I am relatively new to REXX programming and learning it from my mistakes. The scenario is,
1) i have to create a panel, get input from user and
2) substitute the variables in a skeleton file with corresponding values from panel and
3) append it to an existing output dataset.

I am able to do the above three but while appending the output file with skeleton file , my REXX statements are not taking the whole line from skeleton and writing to o/p file (the skel file and output file are of record length 80) instead they are taking lines till column 72(i.e a screen ) and whatever comes after col. 72 is not being written to O/p file.

Please Suggest me how to overcome this..

My REXX statements are

"ispexec ftopen temp"
"ispexec ftincl exskel"
"ispexec ftclose"


"alloc f(in) dsn('"ztempf"') shr"
"alloc f(out) dsn('"userid.100.bigfile"') mod reuse"
"execio * diskr in (stem in. finis"
"execio * diskw out (stem in. finis"
"free f(in out)"


Your help is highly appreciated..


Thanks
____________________________________
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Sat Mar 04, 2006 12:55 am    Post subject: Reply with quote

The last 8 characters of skeleton data are always ignored by ISPF. You can see that in the first section of the fine manual that discuss skeleton.

Solution: Make your unput dataset 88 bytes long.

O.
________
hot box vaporizer


Last edited by ofer71 on Sat Feb 05, 2011 11:35 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
mask-of-zorro
Beginner


Joined: 19 Nov 2005
Posts: 23
Topics: 10

PostPosted: Sat Mar 04, 2006 5:53 am    Post subject: Reply with quote

Hi ofer71,

Thank you very much for the info. Its working fine. I feel sorry for bugging you again.Can u clarify me on one more thing?

In the panel i designed ,i have a field of length, say 15 chars(ALPHANUM). I have a corresponding field for that in my skeleton file. If the user enters just say 3 chars out of 15, what i desired was the rest of the length shud be spaces.But even when i tested it with typing spaces after 3 chars, my output file is having only those 3 characters and spaces are not coming there. Can you tell me what could be the problem??? I am trying to resolve that.....


Thanks for your help!!
_____________________________________
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Sat Mar 04, 2006 7:53 am    Post subject: Reply with quote

Perhaps you can use tabbing. Something like:

Code:

)TB 1 15 25 35
&FLD1!&FLD2!&FLD3!&FLD4

_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
German Castillo
Beginner


Joined: 23 Dec 2005
Posts: 83
Topics: 2
Location: Caracas, Venezuela

PostPosted: Sun Mar 05, 2006 9:45 pm    Post subject: Reply with quote

Or...

From your Rexx


My_Var = Left(MyVar, 15, ' ')

Take a look at the Left function at the Rexx reference manual for more details
_________________
Best wishes,

German Castillo
Back to top
View user's profile Send private message
German Castillo
Beginner


Joined: 23 Dec 2005
Posts: 83
Topics: 2
Location: Caracas, Venezuela

PostPosted: Sun Mar 05, 2006 9:46 pm    Post subject: Reply with quote

German Castillo wrote:
Or...
My_Var = Left(MyVar, 15, ' ')
details


make it
MyVar = Left(MyVar, 15, ' ')

I wish there were an easy way to edit previous posts .. Smile
_________________
Best wishes,

German Castillo
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Mar 06, 2006 9:43 am    Post subject: Reply with quote

Quote:

I wish there were an easy way to edit previous posts ..


German Castillo,

You have it now.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mask-of-zorro
Beginner


Joined: 19 Nov 2005
Posts: 23
Topics: 10

PostPosted: Mon Mar 06, 2006 11:53 am    Post subject: Reply with quote

Thanks for the help German castillo an Mervyn..

Is )TB a section in panel.I tried to include it my pgm but i was thrown an error. Mervyn can u please give me an sample pgm for this,if u have any or any links which will throw some light on this....The problem i am facing is i have none around to help me..i have to do everything on my own..and i am searching for the answers how exactly to solve it


Thanks
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Tue Mar 07, 2006 9:10 am    Post subject: Reply with quote

No, )TB goes into your skeleton. Here's one I have to hand:

Code:

)SEL &DATABASE = CDSUSER           
)TB 1 32 34 65                     
&TBLNAME!&TABVIEW!&COLNAME!&COLTYPE
)TB 32 52 65                       
!&COLFMT!&COLLEN!&NULLABLE         
)ENDSEL                             


Hope it helps,

Merv
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group