How to construct and use library on Mainframe ?

Hi Experts

I'm returning to continue my learning about Mainframe
How to construct and use library on Mainframe ?
I mean: since I've construct a set of procedures that coud be used by other modules, how to link and assemble them ?
I think it's possible to obtain someone else library and make it accessible to my own programs, ok ?
Could you please give an overall instruction to do that ?
The used "catalog" term has connection with what I'm mentioning ?
Thanks in advance !
Eduardo FuerteAsked:
Who is Participating?
giltjrConnect With a Mentor Commented:
Define "procedures."  In z/OS there is a term called procedure, a.k.a. PROC, which is JCL.  These do not get assembled.

Now if by procedure you mean a program.  Well you should have sometype of JCL that does the assemble/compile and link edit.  The link edit will put the executable into a PDS normally, which could be called a library.

To "share" programs that are in difference PDSs/Libraries in JCL you would have a JOBLIB or STEPLIB DD statement.  In this statement you have one or more DD statments that point to the PDS's that contain the programs you need access to.

Now, in the case of something like CICS, there is a special DD statment (DFHRPL) that will contain programs that you want to execute within CICS.

On the mainframe a "catalog" is basically a file that contains a list of files and what volumes they reside on.  You do not need to catalog a file, but it makes life easier.
LowfatspreadConnect With a Mentor Commented:

you don't have to link-edit you can just store the "object code" ...
when you link-edit you don't have to create an executeable (well a fully resolved one anyway)

when you link edit the Syslib dd statement point to a set of Datasets (libraries) of common functions/subroutines
which can be resolved into your final executable...
you can also specifically include portions of object code, and/or executables into you final load module via link-edit
control cards e.g. Include DDNAME(modulename) .... Change modulename etc...

external references in the load module can also be resolved at execution time...
and or you could dynamically load other routines/programs during execution....

please be more specific about the environment in which you are trying to operate...

which Mainframe  (make/model....)
which operating system....  (e.g. Z/os , VM,... , JES2,JES3 ...)
which  development environment.. (TSO/PDF , CMS, ...)
what are the target environments / products that your processes which operate within / alongside (IMS, CICS, TSO , DB2, ...)
what languages are you developing in ...

Eduardo FuerteAuthor Commented:

I'm not properly a mainframe developer.  always working near them but in other departments and using other platforms . But I'd like very much to better understood this work to better interact.

According the replies partially obtained :
Credit Card system

I'm studing your replies and researching  to return with better arguments...
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Eduardo FuerteAuthor Commented:
PS >> and maybe start developing too in the near future, now I'm using Mainframe Express to better learn <<
Whoa.  Credit card?  That opens up a whole bunch of issues.  They are not z/OS related, but you need to make sure you understand PCI-DSS requriments.  Which are changing and always open to interperatation.

There are functions and features in z/OS that allow for easier use of encryption and much better encryption performance.
Eduardo FuerteAuthor Commented:

In truth only the mainframe crew actually  works for credit cards (it means: say a company like e. g. Carrefour has done, decides to launch  a card with own mark, so  the company I work - a bank's branch - could work for them)
But I work in another area systems - microsoft platform.  I'm struggling to better interact with them.
Eduardo FuerteAuthor Commented:

I've got access to a TSO printed material. According to the screens does the TSO operations performs the same task pointed by you in JCL ?

The screens you are showing are "utility" screens use to copy files (or members of a PDS).

You can do the same functions running batch jobs (JCL).

Does that answer you question?  I'm not sure I really understand what you are asking.
Eduardo FuerteAuthor Commented:

I'm guessing the JOB that  Lowfatspread  point at his thread:

"you can also specifically include portions of object code, and/or executables into you final load /module via link-edit
control cards e.g. Include DDNAME(modulename) .... Change modulename etc..."

TSO does the same thing by an automated way (by menus - according with the screens).   Does it make sense ?

Ah.  Sort of.

In TSO you can write a REXX or TSO Clist that is driven by a panel.  

The REXX/CLIST can then generate the JCL and submit a job in the background.

Or the REXX/CLIST can dynamically allocate the needed DD statments and then execute the required program (such as IEWL, the program that performs link editing a.k.a. LKED).

However, you could have a job set that all you need to do is fill in a program name and do the same thing.
LowfatspreadConnect With a Mentor Commented:
the term LIBRARY on the ISPF panel you've shown is just another term for DATASET ... (like a file in other operating systems)

the ISPF facility provides some background facilities for you to manage your Libraries (files/datasets) ...

ISPF also provides a panel driven menu system for performing various activities e.g.  copying , editing, program development, debugging, program compilation (either Foreground "real time" or in batch (background via JCL))

the ISPF environment is developer extensible, you as a developer can construct your own panels and commands to "automate" your common and / or complex tasks ... many languages can be used for this ranging from clist/rexx to Cobol/Assembler...

Library :   built around the concept of a three tier  layout to a dataset / file name

project - The catalogue High level prefix under which the dataset is stored.
group - The basic name identifier of the dataset
type - a third level indicating the type of data being stored

Member - for a PDS(e) Partitioned Dataset the name of the element actually containing the Data...

in Z/os  Dataset names can be up to 44 characters in length and are composed of a set of dotted groups of names...
 each of which can be up to 8 characters in length....

datasets are basically of two types

either    a single file   (SEQUENTIAL)  *1
or a Partitioned Dataset -  a File with named elements MEMBERs within it

PDF brought in this 3 tier naming convention for ease of use....

*1  sequent files can be independant  or part of a GDG generation Data Group  (files share the same basic name the GDG stem and are individually identified by a generation and version number  at the end  GDG files can
can also be referred to by relative numbers e.g. (0) is the latest generation (-1) the previous and (+1),(+2) etc are version of the file to be created....

sorry for the rambling nature of the response...

Eduardo FuerteAuthor Commented:

I've just read your reply and the things got clearer. Tomorrow I'm going to research to better know about some terms and concepts you've used. About version control - years ago I've heard about a product called Endeavour, to do this task, with another mainframe crew.

VSAM can be another dataset member, ok ?

I'm going to interact soon - for me this is a hot theme !

Endeavor is one change managment product for z/OS.

VSAM stands for Virtual Storage Access Method.  It not a dataset member, its a method for access specific types of files, and there are multiple type of VSAM files.
Eduardo FuerteAuthor Commented:

I've read something more about Endeavour - it promotes the dataset from test/ approval/ production phases,  I've just misunderstood that Endeavour could be a version control after I've read the final part of the last Lowfatspread thread.

VSAM is an access data method but the data it access remains in a dataset to, isn't it ?

Just to mention:
project / group / type / Member  - convention
is a very util information (something that was confuse to me)

Thanks for the assistance !
Eduardo FuerteAuthor Commented:
<< better said the last thread  made me remember about Endeavour - the confusion I've done has no connection with the thread contents itself>>
giltjrConnect With a Mentor Commented:
VSAM -- Yes the data is in a data set, but its not considered a library.

Typically in the z/OS world a libary contains things like:

   source code
   copy books
   JCL procedures
   object code
   executable programs
   parameters to a program

They don't contain "data" in the sense of input or output to a program.  VSAM files contain "data."  Example:  You may use a VSAM file to store credit card transactions.  Although you could store these in a "flat", plain sequential file or in a PDS member also.  If you were storing data in a PDS, it would not really be considered a library at that point in time.

As for Endeavor, I've never used it just have head about it, but I think you are right, it is not version control, but change control.  Two different things.

There are version control programs for z/OS (at least there were).  I don't know if it is still around, but I beleive Librarian could do both version and change control.
Eduardo FuerteAuthor Commented:
And Thanks for you efforts !
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.