View previous topic :: View next topic |
Author |
Message |
mask-of-zorro Beginner
Joined: 19 Nov 2005 Posts: 23 Topics: 10
|
Posted: Sat Mar 04, 2006 12:47 am Post subject: Problem in writing to a Output file : REXX |
|
|
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 |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Sat Mar 04, 2006 12:55 am Post subject: |
|
|
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 |
|
 |
mask-of-zorro Beginner
Joined: 19 Nov 2005 Posts: 23 Topics: 10
|
Posted: Sat Mar 04, 2006 5:53 am Post subject: |
|
|
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 |
|
 |
Mervyn Moderator

Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Sat Mar 04, 2006 7:53 am Post subject: |
|
|
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 |
|
 |
German Castillo Beginner

Joined: 23 Dec 2005 Posts: 83 Topics: 2 Location: Caracas, Venezuela
|
Posted: Sun Mar 05, 2006 9:45 pm Post subject: |
|
|
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 |
|
 |
German Castillo Beginner

Joined: 23 Dec 2005 Posts: 83 Topics: 2 Location: Caracas, Venezuela
|
Posted: Sun Mar 05, 2006 9:46 pm Post subject: |
|
|
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 ..  _________________ Best wishes,
German Castillo |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Mar 06, 2006 9:43 am Post subject: |
|
|
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 |
|
 |
mask-of-zorro Beginner
Joined: 19 Nov 2005 Posts: 23 Topics: 10
|
Posted: Mon Mar 06, 2006 11:53 am Post subject: |
|
|
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 |
|
 |
Mervyn Moderator

Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Tue Mar 07, 2006 9:10 am Post subject: |
|
|
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 |
|
 |
|
|