(1) Move to the source (HFS) file system mounted at /etc/dfs cd /etc/dfs (2) Create a z/OS UNIX archive file called /tmp/zfs1.pax that contains the HFS file system mounted at /etc/dfs pax -wvf /tmp/zfs1.pax . (3) Move to the target (zFS) file system mounted at /etc/dce/testzfs1 cd /etc/dce/testzfs1 (4) Read the archive file into the zFS file system mounted at /etc/dce/testzfs1 pax -rv -p e -f /tmp/zfs1.pax
2012年4月30日 星期一
Migrating data from HFS/zFS to zFS
Suppose you have an HFS file system mounted at /etc/dfs. You want to copy this into an empty zFS file system mounted at /etc/dce/testzfs1. You issue the following commands from z/OS UNIX:
2012年4月26日 星期四
CICS without security in an ACF2
F ENF,MODE(CICS,NONE) and set SEC=NO in SIT or
override, the region(s) will come up without ACF2
2012年4月11日 星期三
C - replace substring
char *replace_str(char *str, char *orig, char *rep)
{
static char buffer[4096];
char *p;
if(!(p = strstr(str, orig))) // Is 'orig' even in 'str'?
return str;
strncpy(buffer, str, p-str); // Copy characters from 'str' start to 'orig' st$
buffer[p-str] = '\0';
sprintf(buffer+(p-str), "%s%s", rep, p+strlen(orig));
return buffer;
}
Example:
replace_str("Hello, world!", "world", "Miami@ #")
2012年4月5日 星期四
C - string padding
char *StringPadRight(char *string, int padded_len, char *pad) {
int len = (int) strlen(string);
if (len >= padded_len) {
return string;
}
int i;
for (i = 0; i < padded_len - len; i++) {
strcat(string, pad);
}
return string;
}
that's supposed to do StringPadRight("Hello", 10, "0") -> "Hello00000".
訂閱:
文章 (Atom)