View previous topic :: View next topic
|
Author |
Message |
pk2803
New User
Joined: 06 Nov 2008 Posts: 8 Location: uk
|
|
|
|
Requirement As follows.
I have got input PS file layout like this.
1234567890123456789012345678901234578901234567890
VTN111P0 OCIS#TEST01 OCIS* 100801
VTN131P0 OCIT#TEST01 OCIT* 100801
.
.
.
Now I want to read THIS dataset each record and for each record create text like below
First Line JOBNAME(VTN111P0) ADID(OCIS#TEST)
Secondline APP(OCIS*) DATE(100801)
Create a new member in PDS the name of JOB name VTN111P0 with above text.
So for each reacord in PS, need to create one new member in PDS for above text.
If i have 200 records in PS, I should get 200 members in PDS with above text.
I am very much poor in REXX.
Let me know if you need any other details. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What have you written for yourself so far, and where do you experience the problems.
What research have you done, as there are lots and lots of good code examples on this very forum.
As this is a HELP forum rather than a custom supply forum you need to realise that the contributers on here do like to see some effort from the poster and would rather suggest code improvements than just supplying code. Also, as we contribute on our own time and have no guarantees of when we will be available any urgency in the code requirement is yours and yours alone. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Read the input dataset into a REXX stem variable.
EXECIO.
Loop through the input records one at a time.
DO Controlled repetitive loops.
Parse the input data into the respective variables:
PARSE VAR.
Queue the output records into the data stack.
QUEUE.
You'll have to build and issue a TSO ALLOCATE command to allocate the output PDS and member name.
Write the output.
FREE the output.
Although, if you're by your own admission not very good with REXX, then why code this in REXX? Certainly you could use other options or facilities that you ARE more familiar with? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
> Write the output.
Write is also through Execio
You also need ALLOCATE command for your input dataset.
You need to understand the concept of stem variables. They are produced by the EXECIO statement when you read a file. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
pk2803 wrote: |
Need help on Wrting REXX code |
I suggest you start learning to write English first. |
|
Back to top |
|
|
pk2803
New User
Joined: 06 Nov 2008 Posts: 8 Location: uk
|
|
|
|
Thank you very much for you suggestion.
Everyone got the problem, what i am asking for.
This is Technical Forum, need to look at the problem rather than grammatical errors. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
The UK has a strict policy regarding VISA. You are clearly a fish who slipped through the net. Given your lack of knowledge of English and your obvious lack of programming knowledge, I will inform my trade organization about you and hope they will take it further, resulting in you being sent back to wherever you came. |
|
Back to top |
|
|
pk2803
New User
Joined: 06 Nov 2008 Posts: 8 Location: uk
|
|
|
|
I am sorry, if hurt you..
I wrote this from NOKIA phone, may be typo and keyboard is not user friendly.
Regards, |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
This is Technical Forum, need to look at the problem rather than grammatical errors. |
The "problem" seems to be communication. We will help you get to the result you are looking for - we will not provide the code for you. One of the primary missions of our forum is to help people help themselves. This often involves some looking and work on the part of the requestor.
Expat, Kevin, and Pedro have provided a lot of information. If you do as they suggest, you will have pretty much everything you need. If you find something recommended that is not clear, post what you found and your doubt - someone will be able to clarify.
Quote: |
I wrote this from NOKIA phone, may be typo and keyboard is not user friendly. |
FWIW - it is considered bad form to blame the hardware/software.
Good luck - someone will be here when there are questions. |
|
Back to top |
|
|
pk2803
New User
Joined: 06 Nov 2008 Posts: 8 Location: uk
|
|
|
|
Thank you superk, As per you suggestion, I have coded the REXX program and it is working fine. Cool
Thank you very much all |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for the follow up
d |
|
Back to top |
|
|
|