Need Help in developing tools using Rexx



IBM's Command List programming language & Restructured Extended Executor

Need Help in developing tools using Rexx

Postby Praveen433 » Thu Dec 02, 2010 10:50 pm

Hi
I got recently placed in MNC as a fresher and my first task was to build some tools in Rexx. As i am completely new to this could you people help me in what are the best tools that will come as output of Rexx. As of my first task i have to write rexx code to take backup of a file by just typing "bkup" infront of the dataset, so that the backup file will be created with same as base file but 'bkup' as last qualifier. Could any one help me out in this.
Thanks in advance
Praveen433
 
Posts: 3
Joined: Thu Dec 02, 2010 10:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need Help in developing tools using Rexx

Postby Akatsukami » Thu Dec 02, 2010 11:14 pm

If you are completely new to software tool development and/or Rexx, why did you get this assignment?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Need Help in developing tools using Rexx

Postby Praveen433 » Thu Dec 02, 2010 11:30 pm

It seems like there is delay in assinging projects for us. so mean while they asked us to do our best on this task. I was also trying to learn Rexx thru tutorials, but need support
Praveen433
 
Posts: 3
Joined: Thu Dec 02, 2010 10:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need Help in developing tools using Rexx

Postby enrico-sorichetti » Fri Dec 03, 2010 12:19 am

a question here and there is ok!

but in this case You need FULL training, guidance and support,
I mildly suggest that You/Your organization are expecting too much from a forum
sharing not just general knowledge but designing something ad hoc for Your need

also the requirement is at least murky...
type something in front of a dataset ( from option 3.4 I guess )
and <do something> to take a <backup> of a dataset calling the backup datasetname.bkup

some questions that You should ask and meditate
the 3.4 list is from a catalog driven list or a volume driven one
what utility has to be used to take the backups
what are the datasets eligible ...

what ...
where ...
when ...
how ...
who
what if ...

all the questions that should be clear to the <idTENt> who gave You the assignment
who does not realize that TOOL writing is not something to be tackled lightly

how would You feel using a car built by somebody who knows nothing about cars ??? :D
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: Need Help in developing tools using Rexx

Postby Akatsukami » Fri Dec 03, 2010 12:20 am

::sigh:: I certainly hope that MNC is not expecting to actually get a usable product out of this :roll:

OK, I think that there are already good suggestions as to Rexx textbooks and such that can be gotten by searching the fine Web; I'll handwave a basic knowledge of Rexx into existence for you. Let us look at the requirements.

You say that you will take a back-up of data set X.Y.Z, to be called X.Y.Z.BKUP, yes? What if the DSN is already more than 39 characters long?

What will the retention period of the backup be? Or, if as is common (although certainly not universal), SMS storage class controls retention, what storage class will you try to use? Or will your choices be overridden on the basis of, say, HLQ or data set size? (Hint: don't even think about asking for these answers on these or other fora; only your site support groups -- probably the storage management workgroup -- can answer these questions).

What medium are you backing up to? What utility will you use? Will the backup be foreground or background? What's the expected method of error handling; how aggressive should the tool be in handling PEBKAC errors?

These are not questions that I expect you to snap to attention and parrot answers to; I expect you contemplate the various possibilities that they open and close in your development process.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Need Help in developing tools using Rexx

Postby expat » Mon Dec 06, 2010 3:34 pm

But of course, have you researched the fact that there may already be a backup mechanism in place with any installed ILM software such as HSM / FDR-ABR / Whatever
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: Need Help in developing tools using Rexx

Postby harishcv » Thu Dec 30, 2010 9:58 am

What type of datasets are you trying to run "BKUP" macros - PS/PDS or Load libraries or VSAM???

If its PS/PDS you can try a simple program by your own
Step1: Pass dataset to ISREDIT MACRO
Step2: Allocate BackUp dataset "LIKE" original dataset - Internal logic to check bkup dataset length not to exceed 44 would be fine.
Step3: Copy data/members from original to backup - you can use LMCOPY for this.

Step4: thats it!!!!
harishcv
 
Posts: 11
Joined: Wed Dec 29, 2010 1:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need Help in developing tools using Rexx

Postby Pedro » Thu Dec 30, 2010 10:40 am

As Expat stated, it is best if you use the backup services already provided by the system. (I have been on the same system for 29 years)... but isn't HSM now provided as part of z/OS?

If you follow Harishcv's advice... make sure it runs the second and subsequent times.

Though, I would not use an editor macro... you have to be within the ISPF editor to use it and will not work if you want to 'take backup of a file by just typing "bkup" in front of the dataset'. Just make a regular rexx program. Also, learn how to use IEBGENER (for sequential datasets) and IEBCOPY (for PDS's) and REPRO (for VSAM). Use LISTDSI function to determine the DSORG.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: Need Help in developing tools using Rexx

Postby harishcv » Thu Dec 30, 2010 12:45 pm

Again that depends on your requirements. If you are looking to develop a mass backup deployment tool, then you better contact storage team and explore backup services as suggested by Expact and Pedro.

If you are looking for a simple routine for personal use, better create a macro as I said earlier.
Coding ADDRESS ISREDIT ; "MACRO"; "(DSN) = DATASET" will get you the dataset name if you type "BKUP" (macro command) in front of the dataset. You can use the dataset name extracted to do step 2 & 3 as said earlier.

The macro routines developed using rexx will work any number of times and can apply to N number of datasets together - just like we use HMIGRATE/HRECALL commands.
harishcv
 
Posts: 11
Joined: Wed Dec 29, 2010 1:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need Help in developing tools using Rexx

Postby Pedro » Sat Jan 01, 2011 1:49 am

Coding ADDRESS ISREDIT ; "MACRO"; "(DSN) = DATASET" will get you the dataset name if you type "BKUP" (macro command) in front of the dataset.

I do not believe that will work, as edit macros will only work while you are in the editor. I guess what I object to is the 'in front of the dataset' clause of your statement. Editor macros will not work while you are in the dataset list or in a member list.

Also:
Step2: Allocate BackUp dataset "LIKE" original dataset
will not work the same the second time. In fact, I believe it will fail, which is OK as long as you understand that and code for it.

If you reuse the same backup dataset the second time, you need to be careful of deleted members. IF the user wanted to delete them and then you need to recover the dataset from the backup, you will get the members that were intended to be deleted. ( some of you may think of that as a benefit - I do not)
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post