Mainframe SYSLIB



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Mainframe SYSLIB

Postby CobDummy » Tue Apr 05, 2016 12:33 pm

Hi,

I am new in mainframe, could someone please guide me.

- once I compile a cobol program it will be created in some syslib, that I need to mention in JCL while submitting the job, how to find the syslib path where the programs are being created.

- trying to use copy in cobol program but its giving error, member not found in copy library, I am not sure which one is copy library..

thanks in advance..
CobDummy
 
Posts: 12
Joined: Wed Mar 30, 2016 2:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Mainframe SYSLIB

Postby enrico-sorichetti » Tue Apr 05, 2016 1:03 pm

in IT using the right terminology is very important

syslib is NOT a general use term in IBM terminology.

in general when compiling a program a few datasets/libraries are involved
let' s forget about the sysouts

compile step
- the source program, usually a member in a partitioned dataset
- the library where the copybooks/includes/macros are found
- compiler ouput

linkage editor step
- compiler output as input
- the library where the load module will be stored
- the libraries where external <subroutines> are found
- the linkage editor control statements

SYSLIB is the ddname used for the dataset's concatenation containing the copybooks/includes/macros

at the end to find out the names of the datasets to be used
the best place to ask is Your support or colleagues
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: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Mainframe SYSLIB

Postby Aki88 » Tue Apr 05, 2016 1:13 pm

Hello,

Please share your compilation JCL.
From the info you've shared -

CobDummy wrote:- once I compile a cobol program it will be created in some syslib, that I need to mention in JCL while submitting the job, how to find the syslib path where the programs are being created.


Are you looking for the merged source of the COBOL program or the load module generated, post completion of IGYCRCTL execution?
Either way, have a look here first, to understand a user-defined IGYCRCTL JCL construct, and the DD statements required for it.

SYSLIB in an IGYCRCTL JCL is used to provide COPY-book libraries for compilation; which brings us to the second part of your question:
CobDummy wrote:- trying to use copy in cobol program but its giving error, member not found in copy library, I am not sure which one is copy library..


From what you state, it means that the COPY statement copybook (mentioned by you in the COBOL program) is not present in any of the PDS/E given in your SYSLIB DD concatenation.
Concatenate the correct PDS/E (which has the said COPY member present in it) to the SYSLIB; and try running your compilation JCL again.

Hth.

<Edit: Sorry Enrico, didn't see you'd already posted the reply>
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: Mainframe SYSLIB

Postby CobDummy » Tue Apr 05, 2016 5:43 pm

Hi..

I am getting this compilation error in with COBOL program..
IGYLI0048-S   The member "EMPCPY" was not found in the "COPY" library.


so this error is not related to JCL code (right?)

I don't have any support team, trying to learn by myself..

COBOL Program Code

 IDENTIFICATION DIVISION.        
 PROGRAM-ID. EMPINDX2.          
 ENVIRONMENT DIVISION.          
 INPUT-OUTPUT SECTION.          
 FILE-CONTROL.                  
     COPY EMPCPY.                
 DATA DIVISION.                  
 FILE SECTION.                  
 FD  EMP-INDEX                  
     LABEL RECORDS ARE STANDARD.
 01  EMP-RECORD.                
     05 EMP-ID         PIC X(5).
     05 EMP-FNAME      PIC X(10).
     05 EMP-LNAME      PIC X(10).
                                 
 WORKING-STORAGE SECTION.        
 01  WS-STATUS  PIC X(2).        
 01  EOF        PIC X(1).        
                                 
 PROCEDURE DIVISION.            
 PROGRAM-BEGIN.                  
                                 
     OPEN I-O EMP-INDEX.        
                                 
 PROCEDURE DIVISION.                            
 PROGRAM-BEGIN.                                  
                                                 
     OPEN I-O EMP-INDEX.                        
                                                 
     MOVE "N" TO EOF.                            
     PERFORM  READ-EMP.                          
     PERFORM  DISPLAY-EMP                        
              UNTIL EOF = "Y".                  
                                                 
     CLOSE    EMP-INDEX.                        
                                                 
 PROGRAM-DONE.                                  
     STOP RUN.                                  
                                                 
 READ-EMP.                                      
     READ EMP-INDEX NEXT RECORD                  
     AT END MOVE "Y" TO EOF.                    
*    DISPLAY WS-STATUS.                          
                                                 
 DISPLAY-EMP.                                    
     DISPLAY EMP-ID " " EMP-FNAME " "  EMP-LNAME.
     PERFORM  READ-EMP.                          
 
CobDummy
 
Posts: 12
Joined: Wed Mar 30, 2016 2:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Mainframe SYSLIB

Postby enrico-sorichetti » Tue Apr 05, 2016 5:51 pm

the last post adds nothing to the info already provided.

where did You store the EMPCPY thing ?
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: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Mainframe SYSLIB

Postby CobDummy » Tue Apr 05, 2016 5:55 pm

Placed in same PDS where the COBOL code is, actually that is my doubt.. where to place it.. :(
CobDummy
 
Posts: 12
Joined: Wed Mar 30, 2016 2:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Mainframe SYSLIB

Postby Aki88 » Tue Apr 05, 2016 6:28 pm

Hello,

CobDummy wrote:Placed in same PDS where the COBOL code is, actually that is my doubt.. where to place it.. :(


Hope you'd read the earlier posts prior posting the COBOL code:

Aki88 wrote:Please share your compilation JCL.


enrico-sorichetti wrote:SYSLIB is the ddname used for the dataset's concatenation containing the copybooks/includes/macros


After which it also gave a link to the IBM manuals, which explains the compilation JCL, step by step, DD statement to DD statement.
Before you look any further, you really need to understand how a simple compilation JCL is written.
Once you have understood that, try adding your PDS - which has the 'EMPCPY' member - to the SYSLIB DD concatenation; submit the JCL, and check what happens.

Once again - revisit your compilation JCL; before you actually fix your code, you need to check if you have 'all the pre-requisites' in your compilation JCL; which can be PDS/E containing your copybooks, or SYSIN PDS/E containing your valid COBOL source, or a valid STEPLIB PDS/E; and so on, so forth. Also, do read and understand Enrico's earlier post, which explains various compilation checkpoints.

Hth.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: Mainframe SYSLIB

Postby enrico-sorichetti » Tue Apr 05, 2016 8:09 pm

if You can tell which system You are working on
we might give better suggestions

what about reading the cobol manuals!
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: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post