FLAM® Issue Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001023FL52.2 Subprogram FLUC (CONV)public2021-09-15 10:462021-09-15 14:03
ReporterLukas Trilla 
Assigned ToFalk Reichbott 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformSystem ZOSz/OSOS VersionV2R30
Product Version5.1.25 
Target VersionFixed in Version 
Summary0001023: zip archive of zOS USS directory doesn't contain subdirectories
DescriptionHello Colleagues,

I would like to pack content of zOS USS file system directory including it's subdirectories into a zip archive using FLUC and store it in GDG generation data set under zOS file system for further processing.
The directory I want to pack includes 18 files + 1 subdirectory including around 30 other files. However I am always getting only those 18 files from the parent directory in my output archive and the subdirectory with it's content is missing.
These are the parameters from my JCL:

READ.CHAR(
FILE='/dbs/sftp/ft/*'
)
WRITE.BIN(
   FILE='DD:OUT1'
    ARCHIVE.ZIP()
)

I went through the FLCL manual and I have tried many other wildcard variations in the 'FILE' path line, but none of them worked. The only way it worked, when I added another line like below - Then I had all the structure and and all the files in my archive.
I kind of don't like this solution, I believe simple '/dbs/sftp/ft/*' or similar string should be enough. Hardcoding sub directories can be trouble in future as the structure of the folders can change.

READ.CHAR(
FILE='/dbs/sftp/ft/*'
FILE='/dbs/sftp/ft/old_scripts/*'
)
WRITE.BIN(
   FILE='DD:OUT1'
    ARCHIVE.ZIP()
)

Could you please advise on this? Perhaps there is a bug in the program, perhaps I am doing something wrong... I am not able to figure it out though.
Many thanks for every advice and have a good day!

Lukas
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0001346)
Falk Reichbott (administrator)
2021-09-15 11:22

To include sub directories the DIR object must be defined with recursive.

READ.CHAR(
FILE='/dbs/sftp/ft/*'
)
WRITE.BIN(
   FILE='DD:OUT1'
    ARCHIVE.ZIP(#STREAM#)
)
DIR(RECURSIVE)

If the GDG a PSVB this could result in performance issues because RBA access (byte seek) is required to write standard ZIP files. To prevent this you can request the streamed format, but then you must check if the streamed format supported by the other parties. I have set the corresponding parameter in comment above.

read.char with write.bin is a strange solution, to convert from 1047 to UTF-8. Better you work with read.char(ccsid=1047) write.char(ccsid=utf-8). Normally the files are XML in you case, then it would be better to work with.

READ.TEXT(
FILE='/dbs/sftp/ft/*'
CCSID=1047
)
WRITE.TEXT(
FILE='DD:OUT1'
CCSID=UTF-8
METHOD=LF#UNIX#
ARCHIVE.ZIP(#STREAM#)
)
DIR(RECURSIVE)

With read.xml() write.xml() you can check if anything correct XML and can change the look and feel to be human readable (PRETTYPRINT) or for computer (MINIMIZED) if you want.
(0001347)
Lukas Trilla (reporter)
2021-09-15 13:53

DIR(RECURSIVE) in combination with ARCHIVE.ZIP(#STREAM#) worked perfect! Many thanks for your prompt reaction!

- Issue History
Date Modified Username Field Change
2021-09-15 10:46 Lukas Trilla New Issue
2021-09-15 11:09 Falk Reichbott Assigned To => Falk Reichbott
2021-09-15 11:09 Falk Reichbott Status new => assigned
2021-09-15 11:22 Falk Reichbott Note Added: 0001346
2021-09-15 13:53 Lukas Trilla Note Added: 0001347
2021-09-15 14:03 Falk Reichbott Status assigned => resolved
2021-09-15 14:03 Falk Reichbott Resolution open => fixed


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker