EXPORT
EXPORT Command (for Beginners)
Summary
For extensive information, go through the EXPORT Command (for Experienced)
The EXPORT command exports or creates a backup copy of a cluster or an AIX.
An empty volume cannot be exported. Access method services recognize and maintain the SMS types during EXPORT.
Detailed syntax -
//JOBNAME JOB job-card-parameters
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EXPORT entryname
{OUTFILE(ddname)|OUTDATASET(dataset-name)}
[CIMODE|RECORDMODE]
[ERASE|NOERASE]
[INFILE(ddname)]
[INHIBITSOURCE|NOINHIBITSOURCE]
[INHIBITTARGET|NOINHIBITTARGET]
[PURGE|NOPURGE]
[TEMPORARY|PERMANENT]
/*
Parameters
The EXPORT command mandatory and optional parameters are specified below -
Mandatory Parameters
Parameters | Description |
---|---|
entryname | Specifies the source name of the cluster, alternate index, or user catalog to be exported. |
OUTFILE(ddname) | Specifies the DDname of the output dataset. Short Description: OFILE |
OUTDATASET(dataset-name) | Specifies the name of the output dataset. Short Description: ODS |
Optional Parameters
Parameters | Description |
---|---|
CIMODE | Specifies the data records written to the output dataset as one VSAM control interval. i.e., it uses control interval processing. Short Description: CIM |
ERASE | NOERASE | Specifies the cluster components are to be overwritten with binary zeros or not when the cluster or alternate index is deleted. Short Description: ERAS or NERAS |
INHIBITSOURCE | NOINHIBITSOURCE | INHIBITSOURCE specifies the input dataset records cannot be accessed for any operation other than retrieval after EXPORT. NOINHIBITSOURCE Specifies that there will be no restriction in accessing the input dataset records after EXPORT. Short Description: INHS | NINHS |
Example -
Requirement - Export KSDS to PS file.
Input ESDS File - MATEPK.TEST.ESDS
<===>----10---+----2----+----3----+----4----+--
**** Top of data ****
E0001EMPLOYEE1 DIR LOC1 0000100000
E0002EMPLOYEE2 MGR DEPT1LOC1 0000080000
E0003EMPLOYEE3 MGR DEPT2LOC2 0000075000
E0004EMPLOYEE4 TL DEPT1LOC1 0000050000
E0005EMPLOYEE5 SSE DEPT1LOC1 0000045000
E0006EMPLOYEE6 SE DEPT1LOC1 0000034000
E0007EMPLOYEE7 SSE DEPT2LOC2 0000046000
**** End of data ****
Code -
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
//MATEPKE JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//************************************************************
//* EXPORT DATA FROM VSAM KSDS TO PS DATA SET
//************************************************************
//STEP010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=MATEPK.EMPL.KSDS,DISP=SHR
//OUTPUT DD DSN=MATEPK.EMPL.BACKUP,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(3,2),RLSE),
// UNIT=SYSDA,
// DCB=(DSORG=PS,RECFM=FB,LRECL=47,BLKSIZE=470)
//SYSIN DD *
EXPORT -
MATEPK.EMPL.KSDS -
OUTFILE(OUTPUT) -
CIMODE -
NOINHIBITSOURCE
/*
//*
**************************** Bottom of Data ****************************
In the above JCL, MATEPK is the userid and change it as required.
Output -
Once the above JCL is submitted, check the MAXCC of the job for any errors. If the MAXCC is 00 or 04, then REPRO is successful..
********************************* TOP OF DATA **********************************
IDCAMS SYSTEM SERVICES TIME: 07:25:33
EXPORT -
MATEPK.EMPL.KSDS -
OUTFILE(OUTPUT) -
CIMODE -
NOINHIBITSOURCE
IDC1141I OBJECT NOT SUPPORTED IN CIMODE, RECORDMODE USED
IDC0005I NUMBER OF RECORDS PROCESSED WAS 7
IDC0594I PORTABLE DATA SET CREATED SUCCESSFULLY ON 04/29/22 AT 07:25:33
IDC0550I ENTRY (D) MATEPK.EMPL.KSDS.DATA DELETED
IDC0550I ENTRY (I) MATEPK.EMPL.KSDS.INDEX DELETED
IDC0550I ENTRY (C) MATEPK.EMPL.KSDS DELETED
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 4
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 4
******************************** BOTTOM OF DATA ********************************
Explaining Example -
In the above example,
- MATEPK.EMPL.KSDS specifies the input file.
- OUTFILE(OUTPUT) specifies the output file.
- CIMODE specifies control interval should treat as one logical record.
- NOINHIBITSOURCE specifies the input file records can available for reading, writing, etc.