IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

unload the members to o/p file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Mon Apr 12, 2010 8:02 pm
Reply with quote

hI

My input file contains the PDS name with member names.
I want to copy all the members in to a o/p files.

for ex: i/p file

// DD DSN=XEPSM.JCLPDS(HRH12345),
// DISP=(SHR,KEEP,KEEP)
// DD DSN=XEPSM.HRBSM.JCLPDS(HRH23446),
// DISP=(SHR,KEEP,KEEP)
// DD DSN=XEPSM.HRBSM.JCLPDS(HRH23467),
// DISP=(SHR,KEEP,KEEP)


the o/p file should contain all the contents of members .

How to do it by using IBM utilities......
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Apr 12, 2010 8:08 pm
Reply with quote

IEBCOPY
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Apr 12, 2010 8:09 pm
Reply with quote

Hello,

What should be the dsorg of the output file?

Do you want all of the members as one set of data or. . .?
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Mon Apr 12, 2010 8:21 pm
Reply with quote

yes , i want all the memebers copied into output file.

I am using iebcopy , but getting the errors as below

SYSUT1 VALIDATION ERROR
NOT AN IEBCOPY UNLOADED DATA SET - 1ST PHYSICAL RECORD NOT 64 BYTES LONG - ACTUAL VALUE IS X'0006E0
IDDNAME SYSUT1 REFERS TO PDSU DATA SET ON VOLUME V9W022 NAMED TDSCM.JAN.TEMPF
NO MEMBERS COPIED TO DATA SET REFERENCED BY SYSUT2
JOB HAS TERMINATED WITH ERROR(S)
END OF JOB - 8 WAS HIGHEST SEVERITY CODE
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Apr 12, 2010 8:30 pm
Reply with quote

IEBCOPY has some restrictions on the sequential file you unload to -- and that file is not going to be human-readable, nor will it be usable with any other platform. If this is what you want, then do not specify the DCB for the sequential file -- IEBCOPY will set the record format to be VB, LRECL will be 16 more than the block size of the PDS, and the block size will be 4 higher than the LRECL.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Mon Apr 12, 2010 8:35 pm
Reply with quote

actually my input file is a gdg file.
I want all the members copied into o/p file which is also a gdg.

That o/p file shoule be readable , coz its again used as a i/p file in the very next step.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Apr 12, 2010 9:00 pm
Reply with quote

Okay, you've managed to confuse me. Is your input data set a sequential GDG or a PDS GDG? If it is a PDS GDG, you must use absolute references (.G1234V00) instead of relative references such as (-3) -- and I had to look in three manuals to find out that tidbit! And yet your examples do not have any generations specified -- which imply no GDG is involved.

Please explain in more detail exactly what you are trying to do. When you say the output will be used as input the next step, will it be input to a print routine? building a new PDS? something else? The answer to your requirements depends upon what you are attempting to do.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Apr 12, 2010 9:05 pm
Reply with quote

I think the TS has an I/P file containing a list of members. the I/P file is a GDG.

he wants the o/P file, also to be a gdg, to contain the members - in readable format.

what the TS should supply at this point is the JCL for the JOB he has used.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Apr 12, 2010 9:08 pm
Reply with quote

Hello,

Post the dsorg, blksize, and lrecl of all of the files.

Clearly explain the process from "what you have" to what the copied data will be used to accomplish. You have "started in the middle" with no useful information about the inputs and how the output should be built and used. . .

It sounds like there is one input file that contains the names of other input files/members. . .

Showing the jcl used should help someone help you. . .
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Tue Apr 13, 2010 12:22 am
Reply with quote

U just tell me how to proceed.

I need to do

my i/p file contains only this statement

/ DD DSN=XEPSM.JCLPDS(HRH12345), ------- 1 job
// DISP=(SHR,KEEP,KEEP)
// DD DSN=XEPSM.HRBSM.JCLPDS(HRH23446),--------- 2 job
// DISP=(SHR,KEEP,KEEP)
// DD DSN=XEPSM.HRBSM.JCLPDS(HRH23467),-------- 3rd job
// DISP=(SHR,KEEP,KEEP)

I want all the members are to be copied into a o/p file.that means my o/p file contains all the 3 jobs.

both the i/p and o/p file are sequential gdg file.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Apr 13, 2010 12:24 am
Reply with quote

dbzTHEdinosauer wrote:
what the TS should supply at this point is the JCL for the JOB he has used.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Apr 13, 2010 12:25 am
Reply with quote

My possible solution looks like this:

Code:

//STEP0001 EXEC PGM=SORT                                             
//SORTIN   DD   DATA,DLM=@@                                           
// DD DSN=XEPSM.JCLPDS(HRH12345),                                     
// DISP=(SHR,KEEP,KEEP)                                               
// DD DSN=XEPSM.HRBSM.JCLPDS(HRH23446),                               
// DISP=(SHR,KEEP,KEEP)                                               
// DD DSN=XEPSM.HRBSM.JCLPDS(HRH23467),                               
// DISP=(SHR,KEEP,KEEP)                                               
@@                                                                   
//SORTOUT  DD   DSN=&&T1,DISP=(,PASS),UNIT=VIO,SPACE=(CYL,(1,1))     
//SYSOUT   DD   SYSOUT=*                                             
//SYSIN    DD   *                                                     
  INREC PARSE=(%=(ENDBEFR=BLANKS,FIXLEN=2),                         
               %1=(ENDBEFR=C'DSN=',FIXLEN=4),                         
               %2=(ENDBEFR=C',',FIXLEN=44)),                         
    BUILD=(%2,SQZ=(SHIFT=LEFT,LEAD=C'''',TRAIL=C''''),81:%1)         
  OPTION COPY                                                         
  OUTFIL INCLUDE=(81,4,CH,EQ,C'DD'),REMOVECC,                         
    BUILD=(C'ALLOC F(SYSUT1) DA',                                     
      1,46,SQZ=(SHIFT=LEFT,LEAD=C'(',TRAIL=C') SHR REU'),80:X,/,     
      C'CALL *(ICEGENER)'),                                           
      TRAILER1=(C'FREE F(SYSUT1)',80:X)                               
/*                                                                   
//*                                                                   
//STEP0002 EXEC PGM=IKJEFT01,DYNAMNBR=255                             
//SYSTSIN  DD   DSN=&&T1,DISP=(OLD,DELETE)                           
//SYSTSPRT DD   SYSOUT=*                                             
//SYSPRINT DD   SYSOUT=*                                             
//SYSIN    DD   DUMMY                                                 
//SYSUT2   DD   DSN=MY.GDG(+1),DISP=(MOD,CATLG,DELETE),...           
//*                                                                   
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Tue Apr 13, 2010 3:26 am
Reply with quote

From what the TS has stated in two posts, this is what I infer:

a) The INPUT file is a physical sequential GDG file which contains JCL statements ( RECFM/LRECL/BLKSIZE all unknown/unstated )

b) The requirement is to parse the JCL contained in the GDG input file, and, using the DSNAMEs contained therein, extract the contents of each named library member and add it to an OUTPUT GDG - which is to be another physical sequential file ( RECFM/LRECL/BLKSIZE all unknown/unstated ).

e.g. INPUT physical sequential GDG file contents:
Code:
// DD DSN=XEPSM.JCLPDS(HRH12345),
// DISP=(SHR,KEEP,KEEP)
// DD DSN=XEPSM.HRBSM.JCLPDS(HRH23446),
// DISP=(SHR,KEEP,KEEP)
// DD DSN=XEPSM.HRBSM.JCLPDS(HRH23467),
// DISP=(SHR,KEEP,KEEP)


Library XEPSM.JCLPDS member HRH12345 contains:
Code:
ABCD
EFGH


Library XEPSM.HRBSM.JCLPDS member HRH23446 contains:
Code:
IJKL
MNOP


Library XEPSM.HRBSM.JCLPDS member HRH23467 contains:
Code:
QRST
UVWX


Output physical sequential GDG File will contain:
Code:
ABCD
EFGH
IJKL
MNOP
QRST
UVWX


Perhaps the TS will confirm my understanding, or restate the requirements more explicitly.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Tue Apr 13, 2010 9:58 am
Reply with quote

Hi ronald

I want exactly the same.
could you guide me how to achieve that using any ibm utilities
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Apr 13, 2010 10:07 am
Reply with quote

janmejay wrote:
I want exactly the same.
could you guide me how to achieve that using any ibm utilities
Have you looked at Kevin's PARSE statements?
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Tue Apr 13, 2010 10:47 am
Reply with quote

no. could u help me on that
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Apr 13, 2010 11:21 am
Reply with quote

Look at the manual and Kevin's statements, it will make sense if you try.....
INREC Control Statement & PARSE
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Tue Apr 13, 2010 12:44 pm
Reply with quote

Hi

I think using parse only the member names are to be copied.

I want the contents of the members to be copied to output file.

i needed to do the same as RONALD BURR mentioned in this posting before.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 13, 2010 12:52 pm
Reply with quote

janmejay wrote:
I think using parse only the member names are to be copied.
I want the contents of the members to be copied to output file.

Think again.

You have tried running the job provided by Kevin before saying that you think it will not work. You have ...... haven't you icon_rolleyes.gif
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Tue Apr 13, 2010 3:16 pm
Reply with quote

I used the jcl given by kevin.

ts taking only the last pds name(memname) mentioned in and copy it into o/p file.

previous pds names its not considering
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 13, 2010 3:38 pm
Reply with quote

Well, I don't know what YOU are doing wrong, but Kevins job works perfectly for me.

Can only think that your output GDG is (,CATLG) instead of (MOD,CATLG)
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Tue Apr 13, 2010 4:41 pm
Reply with quote

its working fine. thankx.
can anyone or or kevin can explain me the below code.
I gone through the document but did n't understand it fully.

a brief explain is enough.


BUILD=(%2,SQZ=(SHIFT=LEFT,LEAD=C'''',TRAIL=C''''),81:%1)
OPTION COPY
OUTFIL INCLUDE=(81,4,CH,EQ,C'DD'),REMOVECC,
BUILD=(C'ALLOC F(SYSUT1) DA',
1,46,SQZ=(SHIFT=LEFT,LEAD=C'(',TRAIL=C') SHR REU'),80:X,/,
C'CALL *(ICEGENER)'),
TRAILER1=(C'FREE F(SYSUT1)',80:X)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Load new table with Old unload - DB2 DB2 6
Search our Forums:

Back to Top