View previous topic :: View next topic
|
Author |
Message |
usharaniA
New User
Joined: 22 Jan 2008 Posts: 85 Location: India
|
|
|
|
Hi ,
I have a requirement like this, in a ps file i have data like
Mamber name=Member1
Jobname.1=aaaaa
program name.1=ikj**
programe name.2=PROC
Programe name.3=IEBR
stepname.1=STEP1
stepname.2=STEP2
Mamber name=Member2
Jobname.1=bbbbb
program name.1=ikj**
programe name.2=PROC1
Now, i have to write these data in a tabular format in rexx, some thing like this,
Jobname********Programe name****stepname
aaaaa*********** ikj**************STEP1
**************** PROC ***********STEP2
**************** IEBR
Please leave the asteriks and see it as a table
Can you please tell me how to write the data in tabular format. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What should be done with "member name"? Does it not go to the "output"? Is there a maximum to how many steps/programs you want to allow? SHould there be the same number of steps as programs in a "job"?
You need to continue the "output" to include member2. Where do you plan to write the output (report, another file)?
When you post the complete info, please use the "Code" tag at the top of the reply panel. Then you will not need the asterisks. Use Preview to see your post as the forum will see it rather than how it appears in the reply editor. When the Preview appears as you want it, click Submit.
If you are doing this with clist or rexx, post what you have so far. If you are not using clist/rexx, post how you are dong this and the topic will be moved to some other part of the forum. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Indeed, your question raises a few more questions...
Do you want data like this?
Code: |
Jobname Progname stepname
aaaaa ikj STEP1
PROC STEP2
IEBR
|
If yes, an easy way is:
Code: |
Left(Jobname.xj,12) || Left(Progname.xj,12) || Left(Stepname.xj,8) |
|
|
Back to top |
|
|
awyn
New User
Joined: 11 Feb 2008 Posts: 49 Location: chennai
|
|
|
|
Hi,
The stem variable gets updated for each member.I mean when it is for member1 by jobname , program name , step name will be like
jobname.1 , program name.1 , step name.1
again when i encounter member2,
again my varaiables get updated jobname.1 , program name.1 , step name.1, how do i write now in my output file. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
This is confusing:
Quote: |
again when i encounter member2,
again my varaiables get updated jobname.1 , program name.1 , step name.1, |
Based on the accompanying text, you should have updated jobname.2 and program.name.2, etc... please clarify. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
I think your 'tags' will cause you some confusion (as it did to me):
Code: |
Mamber name=Member1
Jobname.1=aaaaa
program name.1=ikj**
programe name.2=PROC
Programe name.3=IEBR
stepname.1=STEP1
stepname.2=STEP2 |
Confusing because they have numeric value that might be mistaken for an index value. I suggest you use program variables that also include the numeric suffix, in addition to your own indexing. For example:
Code: |
idx = 2
say stepname.1.idx
|
[/code] |
|
Back to top |
|
|
awyn
New User
Joined: 11 Feb 2008 Posts: 49 Location: chennai
|
|
|
|
thanks lot. i got it |
|
Back to top |
|
|
|