zipname.conven 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. Zip file/directories name convention under MVS
  2. ---------------------------------------------------
  3. Draft 1.1
  4. 1. Translating native file names to Zip filenames.
  5. 1.1 Zipping a PDS
  6. On MVS there are directories called PDS (Partition Data Set) which have
  7. the following format : name1.name2.name3(mname)
  8. for example: myuserid.unzip.c(unzip)
  9. So as you see the path delimiter is '.'. Each dir name can be max 8
  10. chars long beginning with a number.
  11. Between '(' and ')' there is the so called member name - it is also 8
  12. chars long. This is the actual file name.
  13. 1.1.1 Converting MVS PDS name to zip path/filename (status: not implemented)
  14. The PDS name is converted to zippath as follows:
  15. in the zip : name1/name2/mname.name3
  16. becomes on MVS: name1.name2.name3(mname)
  17. 1.2 Unzipping as PDS (status: implemented)
  18. When you unzip the file name myuserid/unzip/unzip.c the same process
  19. is done backwards, so you get : myuserid.unzip.c(unzip)
  20. Notice that the file extension is used as last dirname!
  21. 1.2 Unzipping to a different PDS (status: implemented)
  22. You can also use -d option while unzipping for example:
  23. unzip mytest myuserid/unzip/unzip.c -dnewdest.test
  24. then the new name will become:
  25. newdest.test.myuserid.unzip.c(unzip)
  26. Second example:
  27. unzip mytest myuserid/unzip/*.c -dnewdest.test
  28. then you get a PDS:
  29. newdest.test.myuserid.unzip.c(...)
  30. with all *.c files in it.
  31. 1.3 Zipping a Sequential Dataset (status: not implemented)
  32. Sequential dataset is a dataset with NO members.
  33. Such a dataset is translated from native MVS to zip format by replacing
  34. the '.' (points) with '/' (backslash).
  35. Example:
  36. on MVS: name1.name2.name3
  37. becomes in the zip : name1/name2/name3
  38. NOTE : The new filename in the zip has NO extension this way it can be
  39. recognised as a Sequential dataset and not a PDS.
  40. But this also means that all files in the zip archive that have
  41. no extension will be unzipped as Sequential datasets!
  42. 1.4 Using a DDNAMES for input. (status: not implemented)
  43. To use DDNAMES as input file names put a 'dd:' before the ddname:
  44. example: zip myzip dd:name1 dd:name2 dd:sales
  45. In the Zip archive the ddnames are saved as name.DDNAME so if you try
  46. the example above you will get in your zip file (when listing it) :
  47. ..size .. date time .. crc .. NAME1.DDNAME
  48. ..size .. date time .. crc .. NAME2.DDNAME
  49. ..size .. date time .. crc .. SALES.DDNAME
  50. 1.4 Using a DDNAMES as zip name (status: implemented)
  51. It is allowed to use a DDNAME as zipfile, just put dd: before it
  52. example: unzip dd:myzip *.c
  53. this will unzip all .c files from ddname myzip
  54. example2: ZIP DD:MYZIP DD:MANE1 MYSOURCE.C MYDOC.TEXT(ZIPPING)
  55. this will zip ddname name1 file mysource.c and PDS mydoc.text(zipping)
  56. into as a zip file in the ddname myzip
  57. 2. Converting longer path names (unix like) (status: not implemented)
  58. to native MVS names.
  59. When in the zip archive there are dirnames longer that 8 chars they are
  60. chopped at the 8 position. For example
  61. MyLongZippath/WithLongFileName.text
  62. is translated to:
  63. MYLONGZI.TEXT(WITHLONG)
  64. Notice that all chars are converted to uppercase.
  65. 2.1 Using special characters (status: implemented)
  66. Also all '_' (underscore), '+' (plus), '-' (minus), '(' and ')'
  67. from the file name/path in the zip archive are skipped because they
  68. are not valid in the MVS filenames.
  69. 2.2 Numeric file names (status: not implemented)
  70. On MVS no name can begin with a number, so when a dir/file name begins with
  71. one, a leading letter 'N' is inserted. For example:
  72. Contents.512
  73. becomes:
  74. CONTENTS.N512
  75. Zip file/directories name convention under VM/CMS
  76. ---------------------------------------------------
  77. 1. Translating native file names to Zip filenames.
  78. On VM/CMS (not ESA ) there are NO directories so you got only disks
  79. and files.
  80. The file names are delimited with spaces. But for use with unzip/zip
  81. you have to use '.' points as delimiters.
  82. For example on your A disk you have file called PROFILE EXEC
  83. if you want to zip it type : zip myzip profile.exec
  84. If the same file is on your F disk you have to type:
  85. zip myzip profile.exec.f
  86. So as you can see the general format is fname.ftype.fmode
  87. In the zipfile the disk from which the file comes is not saved!
  88. So only the fname.ftype is saved.
  89. If you unzip and you want to give a different destination disk just use
  90. the -d option like:
  91. unzip mytest *.c -df
  92. This will unzip all *.c files to your F disk.
  93. 2. Converting longer path names (unix like) to native VM/CMS names.
  94. When in the zip archive there are dirnames longer that 8 chars they are
  95. chopped at the 8 position. Also the path is removed. For example
  96. Zippath/WithLongFileName.text
  97. is translated to:
  98. WITHLONG.TEXT
  99. Notice that all chars are converted to uppercase.
  100. Also all '+' (plus), '-' (minus), '(' and ')'
  101. from the file name/path in the zip archive are skipped because they
  102. are not valid in the VM/CMS filenames.
  103. If there is no extension for the file name in the zip archive, unzip
  104. will add .NONAME for example:
  105. mypath/dir1/testfile
  106. becomes:
  107. TESTFILE.NONAME
  108. 3. Future?
  109. There is also discussion for a new option on ZIP that you can give
  110. a virtual directory to be added before each file name that is zipped.
  111. For example you want to zip a few .c file and put them in the zip
  112. structure under the directory 'mydir/test', but you can't create dirs on
  113. VM/CMS so you have to the something like:
  114. ZIP myzip file1.c file2.c -dmydir/test
  115. and you get in the zip archive files:
  116. mydir/test/file1.c
  117. mydir/test/file2.c
  118. -------------------------------------------------------------------------
  119. NOTE: Not all of those functions are implemented in the first beta
  120. release of VM/MVS UNZIP/ZIP.
  121. Every ideas/corrections/bugs will be appreciated.
  122. Mail to maillist: Info-ZIP@LISTS.WKU.EDU
  123. George Petrov