View previous topic :: View next topic
|
Author |
Message |
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi,
I have a PS file which has the "IBM PDSLIST utility report for a PDS".
The dump dataset looks something like,
Code: |
PDSLIST 2.1 INSTALLED AT T O STORES LTD. FROM SHARE MVSMODS TAPE VERSION 19
INDEX OF DATA SET XK89.BORED.PROGRAMR
NAME (ALIAS OF) NAME (ALIAS OF) NAME (ALIAS OF) NAME (ALIAS
AVATAR CASE1 CASE2 CASE3
THERE ARE 104 PDS NAMES OF WHICH NONE ARE ALIASES
DCB=(BLKSIZE=27920, LRECL= 80, RECFM=FB ), VOL=SER=KTSO14, LABEL=(CREDT= 8.0
OF 50 DIRECTORY BLOCKS 32 ARE UNUSED
*-----------------------------------AVATAR ------------------------------------
//XK89JOB2 JOB ,'BAD',CLASS=4,MSGCLASS=P,NOTIFY=XK89 JOB02973
//* EXTRA DATASETS USED ARE: (MAKE THEM TEMP IF POSSIBLE)
//* XK89.USED.BATCHES
//* XK89.ALL.BATCHES
//* XK89.AVAILABL.BATCHES
//* XK89.EMAIL.BATCHES
//********************************************************
//STEP1 EXEC PGM=ICETOOL
--------------------------------- END OF MEMBER --------------------------------
*-----------------------------------CASE1 ------------------------------------
//XK89TOD1 JOB 6,'COBOL',NOTIFY=XK89,CLASS=2,MSGCLASS=Y
//**********************************************************************
//**********LETS TEST DIFFERENT COPY TERCHNIQUES************************
//**********************************************************************
//ALBKUP EXEC PGM=IDCAMS,COND=(0,LT)
//SYSPRINT DD SYSOUT=*
//ALFILE DD DSN=XK89.LC.XRFILE,DISP=SHR,AMP=('BUFND=23')
//ALCOPY DD DSN=XK89.LC.XRFILE.DISKCOPY,DISP=OLD
--------------------------------- END OF MEMBER --------------------------------
|
The dump dataset has all the members of a PDS and the PDS contents.
Could you pls let me if it is possible to reconstruct this data into a PDS again using any pre-defined utility or
is writing a custom made REXX code, the only option?
I am ok to write a REXX, but wanted to know if there is already a utility so as to save some work.
The reason why I require this is, I have resigned my current job and shifting to another,
I have a PDS that has all the utilities which i have cobbled over 3 years. So Im taking a dump using PDSLIST and trying to reconstruct.
Thanks in advance, |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi,
Attached is the actual job that created the dump data,
Code: |
//XK891D50 JOB 1,'CREDITS',CLASS=1,MSGCLASS=P,NOTIFY=XK89
//DREAM EXEC PGM=PDSLIST
//SYSUT1 DD DISP=SHR,DSN=XK89.BORED.PROGRAMR
//SYSOUT DD SYSOUT=*
//SYSPRINT DD DISP=SHR,DSN=XK89.BORED.PROGRAMR.PS
//SYSIN DD *
NAMES DDN=SYSUT1,OPTIONS=NAMES
/* |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
HI Vasanth,
Suggest you simply download the contents of the pds to a directory on your pc, compress the directory, and e-mail that to your personal e-addr. . .
I do this with some regularity |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi D,
Thats exactly the idea
I have this PDSLIST data downloaded in my PC as notepad data.
But in the new company I have to deploy this PDS back and create the members inside it to get the tools working.
Reconstructing the PDS back in the new company is the place im struck.
Some of the programs span across pages, so its a bit tedious to copy paste them.
P.S. Im trying something with DFSORT, hope it wil "sort" out the problem. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
any reason not to try to download the PDSLIST program from the CBTTAPE ?
it' s the most likely place where You can find it |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Vasanth,
Quote: |
But in the new company I have to deploy this PDS back and create the members inside it to get the tools working. |
Any chance of doing the download again from the actual dataset?
Maybe if you buy lunch, someone can ftp the members and send them to you?
I'd make sure there is no problem for your old co-worker to do this. Some places might not care, but others might have rules against this. . . |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
my previous post was misleading... pdslist is list tool only
why copy and paste ... doesn' t Your new company let You ftp a sequential dataset
after the dataset is accessible thru TSO the fatset could be to hand edit and rebuild the members when You face the need of using them
where would You plan to run the REXX script anyway ,
if the data snippet posted is real it does not look too complicated
to read the file and subtitute the separtor lines with ./ADD and ./ENDUP cards |
|
Back to top |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
Move all the output from PDSLIST to an 80 byte dataset.
Code: |
*-----------------------------------AVATAR ------------------------------------
//XK89JOB2 JOB ,'BAD',CLASS=4,MSGCLASS=P,NOTIFY=XK89 JOB02973
//* EXTRA DATASETS USED ARE: (MAKE THEM TEMP IF POSSIBLE)
//* XK89.USED.BATCHES
//* XK89.ALL.BATCHES
//* XK89.AVAILABL.BATCHES
//* XK89.EMAIL.BATCHES
//********************************************************
//STEP1 EXEC PGM=ICETOOL
--------------------------------- END OF MEMBER --------------------------------
|
Change the 1st line to ./ ADD NAME= and delete the last line. Each library member should be separated by a ./ ADD NAME=???????? control card.
Code: |
./ ADD NAME=AVATAR
//XK89JOB2 JOB ,'BAD',CLASS=4,MSGCLASS=P,NOTIFY=XK89 JOB02973
//* EXTRA DATASETS USED ARE: (MAKE THEM TEMP IF POSSIBLE)
//* XK89.USED.BATCHES
//* XK89.ALL.BATCHES
//* XK89.AVAILABL.BATCHES
//* XK89.EMAIL.BATCHES
|
FTP the 80 byte file to your PC and burn it to a TXT file on a CD-R.
When you're ready to recreate the PDS, allocate it in TSO option 3.2. Then code the PDS name in the IEBUPDTE job step, cut/paste or code the dataset under SYSIN, and run the job.
Code: |
//UPDATE1 EXEC PGM=IEBUPDTE
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=HLQ.PDS.NAME,DISP=SHR
//SYSUT2 DD DSN=HLQ.PDS.NAME,DISP=SHR
//SYSIN DD *
./ ADD NAME=???????
member data
./ ADD NAME=???????
member data
./ ADD NAME=???????
member data
|
|
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi,
Will tso TRANSMIT and RECEIVE work ?
Create a TRANSMIT file, it can put all members in a sequential file.
Use RECEIVE to extract members to new PDS.
Sushanth |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Sushanth,
have you tried it ?
Actually that's the method I have used over the years for any file , LOADLIB's JCL libraries etc.
Gerry |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
Will tso TRANSMIT and RECEIVE work ? |
certainly yes, but the TS is not in the old workplace any longer,
so he cannot do the TRANSMIT part |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Is it not illegal to take data from a former employer to a new one?
Even if you created it yourself ? You got payed to do that, so its the
property of the former employer. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi,
Thanks for all who had time to look at this,
I will try the suggested IEBUPDTE solution.
Quote: |
Maybe if you buy lunch, someone can ftp the members and send them to you? |
mmm.... ok but this could cause some issues to the person who is FTP'ing it, since there are some firewalls and somethings like that at our shop which prevents FTP to third party servers. FTP must be authorised or something IDK.
Quote: |
Is it not illegal to take data from a former employer to a new one? |
Im not gonna loot the private data of my company , there are some programs which are needed in handy for quick reference,
eg:
I copy paste the ALLOC statement all the time,
Code: |
"ALLOC FI(SOURCE) DA('"XK89.BORED.PROGRAMR"') SHR" |
it wud be tedious to search everything from the internet and start from scratch incase if i forget a small syntax.
Thanks, |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Hi Peter!
Quote: |
Is it not illegal to take data from a former employer to a new one? |
that' s a murky issue You are raising,
all depends on the <history> of what You are taking away
for the <tools> part it is common practice to take an give,
these tools and samples are usually developed for a strict audience and are not usually business crucial,
furthermore the ethics dictate that You develop them on Your own time
even if on the <customer> equipment and with the <customer> permission
furthermore the IP of the coding might be left to the customer, but the KNOW HOW is still completely Yours ,
so You have the right to recreate the coding because YOU know how to!
as a consultant You have the right to use the overall knowledge gained with previous ones |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi Enrico,
Quote: |
so he cannot do the TRANSMIT part |
Code: |
XMIT MFFJES2.userid DSNAME('KJSULL.TEST')
OUTDSNAME('KJSULL.TEST.XMIT') |
Can i not take the KJSULL.TEST.XMIT file to another shop and use the RECEIVE command and put it in a new dataset,
Code: |
RECEIVE +
INDDNAME(FROMFILE)
DATASET('newuserid.TESTING.XMIT') |
No, i have not tested it. So, i have been working in only one place.
Quote: |
Is it not illegal to take data from a former employer to a new one?
Even if you created it yourself ? You got payed to do that, so its the
property of the former employer. |
Yes. Absolutely.
But, "Rules of Laziness of Re-inventing" says this is 0.K.
Sushanth |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Hello Enrico,
tools i created were production tools (so business critical).
I wonder about what you mean by "your own time". One
creates tools, sources etc. in working time (so one is payed
for that)
The know how is of course for the creator, that means you can
recreate everything from memory, notes, snippets whatever.
Doesnt mean you can dump a pds and walk out the door with
the stuff.
Well im not a saint myself, but someone could get into trouble
with that kind of actions.
B.t.w, did you have a nice time with all that now up your nose? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
I wonder about what you mean by "your own time". |
I mean that the development would not interfere with the project planning
also that the customer never asked for such tools,
but the various groups I worked with appreciated my give and did not care abut my take...
I would have never taken away coding developed based on the customer environment , requirements and needs, and developed according to the project planning ! |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Enrico,
Quote: |
I would have never taken away coding developed based on the customer environment , requirements and needs, and developed according to the project planning !
|
There was nothing personal in my comment. I was wondering about
the TS, nothing was made clear to me if it was a bunch of tools made to
make life easy or software to keep the business running.
And "own time" i almost never happened to have. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Hi Peter ! sorry for the bad wording !
never took it as a personal issue!
Quote: |
tools made to make life easy |
that' s exactly the object of give and take |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi,
I tried something out with REXX and the below code works OK in building the PDSLIST dump back into a PDS with members and data.
Code: |
/*rexx*/
/* comments **********************************************************/
/* mem_name1 - name of the member we are about to create */
/* last_record - flag to indicate if we have reached last record */
/* ok_write - first record found, write the below records */
/* out_array - stem variable containing the records to be output */
/* out_count - count of records in out_array */
/****************************************************Author - Vasanth */
"ALLOC FI(SOURCE) DA('"XK89.BORED.CLONE1"') SHR"
"EXECIO * DISKR source (STEM dataLINES. FINIS "
VAR1='XK89.VERY.BORED.PROGRAMR'
do i = 1 to datalines.0
if substr(datalines.i,1,21) = '*--------------------' then
do
mem_name = substr(datalines.i,37,8)
mem_name1= strip(mem_name)
say 'now processing member ' mem_name1 '....'
out_count = -1
j = 0
ok_write = 1
last_record = 0
end
if substr(datalines.i,35,13) = 'END OF MEMBER' then
do
say ' i have encountered end of member,record number is ' i
j=0
last_record = 1
end
if ((ok_write = 1) &,
(substr(datalines.i,1,21) \= 'PDSLIST 2.1 INSTALLED') &,
(substr(datalines.i,1,22) \= ' LISTING OF DATA SET') &,
(substr(datalines.i,1,22) \= ' ')) then
do
out_count = out_count + 1
if out_count > 0 then
do
out_array.out_count = substr(datalines.i,1,80)
end
if last_record = 1 then
do
drop out_array.out_count
out_count = out_count - 1
var2="XK89.VERY.BORED.PROGRAMR("||mem_name1||")"
var3=var2
say 'resolved member name is ' var3 ||'.....'
"alloc f(destiny) DS('"VAR3"') OLD REUSE"
out_array.0 = out_count
say 'number of lines in the member ' mem_name1 ' is ' out_array.0
"execio * DISKW destiny (FINIS STEM out_array."
ok_write = 0
"free file(destiny)"
drop out_array.
end
end
end
"free file(source)"
exit |
Thanks |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Quote: |
I was wondering about
the TS, nothing was made clear to me if it was a bunch of tools made to
make life easy or software to keep the business running. |
I guess I put my point that I was not taking business critical stuff with the words,
Quote: |
I have a PDS that has all the utilities which i have cobbled over 3 years. |
May be I was ambiguos.. mmmm... IDK |
|
Back to top |
|
|
|