Page 1 of 1

Copy from Librarian dataset to sequential

PostPosted: Fri Oct 23, 2015 6:41 pm
by hpawar2
Hi all,

I am trying to copy a single COBOL member from librarian to a PS file using JCL. It is copied to PS file with expansion of -INC members. That is, my PS file contains all the -INC members in expanded form. I want to copy it without expansion. Here is the code I used :

1) Tired to use IEBGENER but it gives expanded -INC :

//LIBMEM EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=&MASTER(XXXXXX),SUBSYS=LAM
//SYSUT2 DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *


2) Tried to use AFOLIBR but this also gives expanded -INC :
//EXTRACT EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'
//OSJOB DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//MASTER DD DSN=&&MASTER,DISP=SHR
//SYSIN DD *
-OPT UTILITY
-EXTRACT XXXXXXX
-EDIT /-INC/=INC/
/*

3) Tried to use AFOLIBR with INCASIS but this also gives expanded -INC :

//EXTRACT EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'
//OSJOB DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//MASTER DD DSN=&&MASTER,DISP=SHR
//SYSIN DD *
-OPT UTILITY
-EXTRACT XXXXXXX INCASIS
/*

Searched it in many places and got that there is some restriction on -INC with AFOLIBR and the way is to edit and make it =INC instead of -INC but that is also not working. I am not sure what I am missing.

Thanks!

Re: CA LIBRARIAN QUERY

PostPosted: Fri Oct 23, 2015 7:48 pm
by Robert Sample
From the CA-LIBRARIAN batch reference manual:
The -EXTRACT Utility control statement copies all the data records of a specific level
of the named member into the jobstream file (OSJOB for MVS or JOBSTR for
VSE). -EXTRACT copies the data records to the jobstream file without
opening the master file for update. -INC commands embedded among the data
records are expanded during the copy process.
Instead of EXTRACT, why not try PUNCH or PRINT?

Re: Copy from Librarian dataset to sequential

PostPosted: Sat Oct 24, 2015 3:16 am
by NicC
Please have the good manners to not tag your problem onto someone elses. Did you read the forum rules? Topic split.

Re: Copy from Librarian dataset to sequential

PostPosted: Tue Oct 27, 2015 12:03 pm
by hpawar2
Sorry I should have opened a new topic.

Thanks a lot Robert I use PRINT and it worked.

Re: Copy from Librarian dataset to sequential

PostPosted: Tue Oct 27, 2015 6:04 pm
by Robert Sample
Glad to hear you found a solution!