Choose the volume for xmit file generated with the XMIT command - zos

I'm using the XMIT command to archive a dataset. But I can't choose the volume of the xmit file.
The dataset I'm archiving is on a specific volume and I want the xmit archive on the same volume but there is no such option to acheive that.
I use this command on z/OS UNIX:
/bin/tsocmd "XMIT N1.USER DA('"DATASET.TO.ARCHIVE"') OUTDATASET('"DATASET.TO.ARCHIVE.XMIT"') NOLOG"

Looking at the command, you can specify OUTDD or OUTFILE to refer to a pre-allocated file for the output. If you issue the command using JCL and IKJEFT01, you could pre-allocate the XMIT file in the JCL using IEFBR14 and whichever volume you like? I've just tried this with a pre-allocated file and it worked.

Related

DB2 restore from encrypted back-up

I am trying to restore a DB2 database using an encrypted backup file. The backup zip file contains an .lst file, a .ddl file, over 3000 .ixf files, same number of message files and a folder with few .lob files in it.
I have tried using bind # list_file grant public after placing the .lst file and .ixf files in the /bind directory. But the error was that .ixf files could not be opened.
Any help appreciated.
What you have is not a backup (encrypted or otherwise) but the output from the db2move export command execution. Read the db2move documentation to learn how to perform the opposite operation.

How to skip "Access Denied" Folder when zip folder with command-line?

I have a batch file to copy data between 2 Disk below:
"C:\Program Files (x86)\WinRAR\WinRAR.exe" a -ag E:\Backup C:\NeedBackup -ms
Maybe use Winrar or 7-zip but they cannot copy folder with Deny for all permission. I want to skip that folder and continue to copy other files.
Anyone help me???
Start WinRAR and click in menu Help on Help topics. On tab Contents open list item Command line mode. Read first the help page Command line syntax.
Next open sublist item Switches and click on item Alphabetic switches list. While reading the list of available switches for GUI version of WinRAR build the command line.
For example:
"%ProgramFiles(x86)%\WinRAR\WinRAR.exe" a -ac -agYYYY-MM-DD -cfg- -ep1 -ibck -inul E:\Backup C:\NeedBackup\
Note 1: Switch -inul implicitly enables -y which is not documented but I know from author of WinRAR and my own tests.
You might use also the switch -dh although I recommend not using it for this backup operation.
By using additionally switch -ao the created backup archive would contain only files with having currently archive attribute set. This means only files added/modified since last backup are added to new archive because of usage of switch -ac in previous backup operation, i.e. creating incremental backup archives instead of always complete backups.
Well, the switch -df could be also used instead of -ac and -ao to create incremental backups. WinRAR deletes only files which could be 100% successfully compressed into the archive.
For details on those switches read their help pages.
Note 2: The command line creates a RAR archive file. For a ZIP file you would need additionally the switch -afzip.
Note 3: 7-Zip has also a help file explaining in detail also the usage from command line with all available commands and switches.

Export DataStage Job Designs to .dsx file

I am trying to export the DataStage job designs with executables. Below is the screenshots I use to export from the GUI.
This is the two commands I use:
dsexport.exe /h=XX /U=XX /p=XX projectXXX /job=XXX jobname.dsx
dsexport.exe /h=XX /U=XX /p=XX projectXXX /job=XXX /EXEC /APPEND jobname.dsx
The file generated from commands is bigger than the one from GUI. Anyone knows how to use dsexport command to export jobs with the options as in the GUI screenshots. much appreciated. I am using Designer V8.5.
JS
C:\IBM\InformationServer\Clients\Classic>dsexport /d={ip address of server} /u={user id} /p={password} /job={job to export} {Project where job is located in} {FileName.dsx}
try this, it will export a single dsx file with all informations
P.S.I am using version 11.3
As you can see GUI is excluding some read-only files which is not excluded in command line this is why the file size difference is there.
You have "Include Dependent Items" unchecked in the GUI. The command line will include dependent items by default (i.e. shared containers or routines). You can disable this behaviour on the command line by using the /NODEPENDENTS command switch.

Logrotate not generating all files after run

Hello people
It's my first time using logrotate and I don't know if I'm configuring it in the right way. I'm using it with loggerhead log file in Ubuntu 11.04
Log is under
/log/loggerhead/loggerheadd.log
My configuration file looks like this
/log/loggerhead/loggerheadd.log {
daily
rotate 7
compress
delaycompress
missingok
}
Then I run a force rotation
logrotate -f /etc/logrotate.d/loggerhead
and that change the name of the log file to
/log/loggerhead/loggerheadd.log.1
And didn't create the original file (loggerheadd.log) again, so I couldn't run a new force rotation, because "the file doesn't exist".
So, it's supposed that the application write entries in "loggerheadd.log" but when logrotate run the file will be renamed, so where will be written the log entries? Am I missing something?
Hope you can help me
By default logrotate will just rename your files, so your old file will be gone.
You can either use the create option to create a new file after the old one is used, or copytruncate to copy the original file to one with a new name, then truncate the original. Either option will do what you're asking for (more details on the man page here)

How does a operating system create a unique file handle?

While creating a file, you provide the name of a file to operating system and
it creates file and returns you the handle.
I am curious to know how it is created.
Does the operating system do some kind of hashing on file name to create a unique file handle
or does it increase count of created files and return it as a file handle?
No, it's an index into an array inside the OS kernel, unique to that one process. File handles are usually just small integers.
File handles are only unique within one process at a given time. On Linux I think that it is a simple counter that is incremented. I think that Windows returns the memory address to an information block about the file (the information block's structure is internal to the operating system, so it's not possible to deal with it directly).
The file handle (file descriptor) is just a number which is unique for that particular process. For instance, standard input, output and error has fds (0, 1, 2). In linux you can check the process' file descriptor in /proc/PID/fd where PID is process id.
Here is an example:
$ pidof executable
4711
$ ls -l /proc/4711/fd
...
$ # Use 'lsof' to show file descriptor opened by this process:
$ lsof -p 4711
...