IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need help on Wrting REXX code


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pk2803

New User


Joined: 06 Nov 2008
Posts: 8
Location: uk

PostPosted: Sat Aug 07, 2010 12:24 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Aug 07, 2010 1:34 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Aug 07, 2010 4:55 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sat Aug 07, 2010 8:07 pm
Reply with quote

> 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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Sat Aug 07, 2010 11:25 pm
Reply with quote

pk2803 wrote:
Need help on Wrting REXX code


I suggest you start learning to write English first.
Back to top
View user's profile Send private message
pk2803

New User


Joined: 06 Nov 2008
Posts: 8
Location: uk

PostPosted: Sat Aug 07, 2010 11:30 pm
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Sun Aug 08, 2010 1:26 am
Reply with quote

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
View user's profile Send private message
pk2803

New User


Joined: 06 Nov 2008
Posts: 8
Location: uk

PostPosted: Sun Aug 08, 2010 3:41 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Aug 08, 2010 9:10 am
Reply with quote

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
View user's profile Send private message
pk2803

New User


Joined: 06 Nov 2008
Posts: 8
Location: uk

PostPosted: Sun Aug 08, 2010 10:26 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Aug 08, 2010 10:31 am
Reply with quote

Good to hear it is working - thank you for the follow up icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top