Page 1 of 1

How can I upload my datasets to our mainframe?

PostPosted: Fri 10 Jul 2009, 02:15
by sysprog
The most effective way to upload your own datasets to our mainframe is using DSS-TERSE-FTP. You need setup or have access a FTP server that DeZhi mainframe can connect to.

Here are the brief steps to make this transfer successful:
1. Dump your dataset from the source mainframe, using DFDSS, or TSO XMIT command.
The DFDSS can pack multiple datasets into one dataset, whilc TSO XMIT can only make one dataset at a time.
Here is a sample JCL for DFDSS dump:
Code: Select all
//DELETE  EXEC PGM=IDCAMS                                   
//SYSPRINT DD SYSOUT=*                                     
//SYSIN    DD *                                             
  DELETE userid.TEMP.DUMP                                   
  IF LASTCC<=8 THEN SET MAXCC=0                             
//*                                                         
//BACKUP  EXEC PGM=ADRDSSU,COND=(0,NE)                     
//SYSPRINT DD SYSOUT=*                                     
//DUMPDS   DD DISP=(,CATLG),UNIT=3390,RECFM=U,LRECL=32760,
// SPACE=(CYL,(10,10),RLSE), DSN=userid.TEMP.DUMP <--CHANGE
//SYSIN    DD *                         <--- CHANGE
  DUMP DS(INCLUDE(userid.**)) ODD(DUMPDS) TOL(ENQF)
/*


2. Use IBM TERSE utility to compress the dump dataset.
Code: Select all
//DELETE  EXEC PGM=IDCAMS                                   
//SYSPRINT DD SYSOUT=*                                     
//SYSIN    DD *                                             
  DELETE userid.TEMP.DUMP.TRS                                   
  IF LASTCC<=8 THEN SET MAXCC=0                             
//*
//TERSE    EXEC PGM=TRSMAIN,PARM='PACK'                       
//SYSPRINT  DD SYSOUT=*,DCB=(LRECL=133,BLKSIZE=12901,RECFM=FBA)
//INFILE    DD DISP=SHR,DSN=userid.TEMP.DUMP                         
//OUTFILE   DD DISP=(NEW,CATLG),UNIT=SYSALLDA,   
//          DSN=userid.TEMP.DUMP.TRS,                               
//          SPACE=(CYL,(10,10),RLSE)


3. Download the tersed file from the source system to your PC, or any host with FTP server available to the internet. You can transfer them via FTP or TN3270 download with binary transfer.

4. Pre-allocate your tersed dataset on our Dezhi mainframe, with following format:
Code: Select all
//DEFTRS   EXEC PGM=IEFBR14
//TRSFILE  DD DISP=(NEW,CATLG),UNIT=SYSALLDA,                       
//          DSN=userid.TEMP.DUMP.TRS,                                 
//          SPACE=(CYL,(10,10)),LRECL=1024,RECFM=FB


5. On Dezhi Mainframe, submit a FTP batch job, to transfer the tersed file from your PC (with FTP server running) to our mainframe:
Code: Select all
//...jobcard here...
//UPLOAD EXEC PGM=FTP,PARM='(EXIT'
//OUTPUT   DD SYSOUT=*
//INPUT   DD *
   your.pc.ip.address
   PC FTP user
   PC FTP password
   cd your_ftp_mapped_directory
   binary
   get userid.TEMP.DUMP.TRS +
   'userid.TEMP.DUMP.TRS'  (REPLACE
   quit
/*


6. On Dezhi Mainframe, unterse the tersed file to DFDSS dump file or TSO XMIT format file.
Code: Select all
//DELETE  EXEC PGM=IDCAMS                                   
//SYSPRINT DD SYSOUT=*                                     
//SYSIN    DD *                                             
  DELETE userid.TEMP.DUMP PURGE                                 
  IF LASTCC<=8 THEN SET MAXCC=0                             
//*
//UNTERSE   EXEC PGM=TRSMAIN,PARM='UNPACK'                         
//SYSPRINT  DD SYSOUT=*,DCB=(LRECL=133,BLKSIZE=12901,RECFM=FBA)   
//INFILE    DD DISP=SHR,DSN=userid.TEMP.DUMP.TRS
//OUTFILE   DD DISP=(NEW,CATLG),UNIT=SYSALLDA,                       
//          DSN=userid.TEMP.DUMP,                                 
//          SPACE=(CYL,(10,10))


7. Restore the original datasets via DSS RESTORE, or TSO RECEIVE command.
Code: Select all
//RESTORE EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*                                     
//DUMPDS   DD DISP=SHR,DSN=userid.TEMP.DUMP                 
//OUTVOL   DD DISP=OLD,UNIT=3390,VOL=SER=FUSR1A             
//SYSIN    DD *                                             
  RESTORE DATASET(INCLUDE(**)) INDD(DUMPDS) OUTDD(OUTVOL) -
          RENAMEU(userid) STORCLAS(USER) -                     
          CATALOG                                           
/*

(Un)Terse for non z/OS platforms

PostPosted: Sun 16 Aug 2009, 13:37
by prino
For those interested, the hercules-390 group on Yahoo! has in the file area a .ZIP file called "pcterse.zip" that contains a number of (Un)Terse programs for various non z/OS platforms.

Please be aware that you have to be a member of this group to download this file.