chtag does not work on z/OS UNIX
up vote
2
down vote
favorite
I'm trying to tag ASCII files on z/OS host shell, so we do not have to specify the code page on the command line.
> echo > iso.txt
> chtag -t -c 819 iso.txt
> vi iso.txt
Type in "Hello" then quit and save
> ls -T iso.txt
t ISO8859-1 T=on iso.txt
> od -x iso.txt
0000000000 C885 9393 9615
examining the iso.txt
file shows it contains EBCDIC.
How do I set the tools to make use of the code page tag attribute? Note that explicitly specifying the code page using -W filecodeset=819
works.
posix mainframe code-page zos
add a comment |
up vote
2
down vote
favorite
I'm trying to tag ASCII files on z/OS host shell, so we do not have to specify the code page on the command line.
> echo > iso.txt
> chtag -t -c 819 iso.txt
> vi iso.txt
Type in "Hello" then quit and save
> ls -T iso.txt
t ISO8859-1 T=on iso.txt
> od -x iso.txt
0000000000 C885 9393 9615
examining the iso.txt
file shows it contains EBCDIC.
How do I set the tools to make use of the code page tag attribute? Note that explicitly specifying the code page using -W filecodeset=819
works.
posix mainframe code-page zos
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm trying to tag ASCII files on z/OS host shell, so we do not have to specify the code page on the command line.
> echo > iso.txt
> chtag -t -c 819 iso.txt
> vi iso.txt
Type in "Hello" then quit and save
> ls -T iso.txt
t ISO8859-1 T=on iso.txt
> od -x iso.txt
0000000000 C885 9393 9615
examining the iso.txt
file shows it contains EBCDIC.
How do I set the tools to make use of the code page tag attribute? Note that explicitly specifying the code page using -W filecodeset=819
works.
posix mainframe code-page zos
I'm trying to tag ASCII files on z/OS host shell, so we do not have to specify the code page on the command line.
> echo > iso.txt
> chtag -t -c 819 iso.txt
> vi iso.txt
Type in "Hello" then quit and save
> ls -T iso.txt
t ISO8859-1 T=on iso.txt
> od -x iso.txt
0000000000 C885 9393 9615
examining the iso.txt
file shows it contains EBCDIC.
How do I set the tools to make use of the code page tag attribute? Note that explicitly specifying the code page using -W filecodeset=819
works.
posix mainframe code-page zos
posix mainframe code-page zos
edited Nov 16 at 7:34
Adam Limbert
169112
169112
asked Oct 28 '16 at 15:26
Stavr00
29318
29318
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
There are support mechanisms for doing auto conversion based on tagging. To do what you’re interested in, I replicated your scenario on my z/OS 2.3 system. To accomplish what you want you can set _BPXK_AUTOCVT=ON
. I repeated the provided test case and then set _BPXK_AUTOCVT=ON
to demonstrate the desired behaviour worked.
$ echo > iso.txt
$ chtag -t -c 819 iso.txt
$ ls -T iso.txt
t ISO8859-1 T=on iso.txt
$ vi iso.txt (enter Hello, save then exit)
$ od -x iso.txt
0000000000 C885 9393 9615
0000000006
The word Hello is stored as EBCDIC despite having tagged the file as 819.
Next, setting _BPXK_AUTOCVT=ON
enables auto conversion.
$ export _BPXK_AUTOCVT=ON
$ echo > iso.txt
$ chtag -t -c 819 iso.txt
$ vi iso.txt (enter Hello, save then exit)
$ od -X iso.txt
0000000000 48656C6C 6F0A0000
0000000006
Here you can see that the auto-conversion function stored the text in the correct codeset.
References:
- IBM Doc on relevant Environment Variables
- File Tagging and Conversion
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
There are support mechanisms for doing auto conversion based on tagging. To do what you’re interested in, I replicated your scenario on my z/OS 2.3 system. To accomplish what you want you can set _BPXK_AUTOCVT=ON
. I repeated the provided test case and then set _BPXK_AUTOCVT=ON
to demonstrate the desired behaviour worked.
$ echo > iso.txt
$ chtag -t -c 819 iso.txt
$ ls -T iso.txt
t ISO8859-1 T=on iso.txt
$ vi iso.txt (enter Hello, save then exit)
$ od -x iso.txt
0000000000 C885 9393 9615
0000000006
The word Hello is stored as EBCDIC despite having tagged the file as 819.
Next, setting _BPXK_AUTOCVT=ON
enables auto conversion.
$ export _BPXK_AUTOCVT=ON
$ echo > iso.txt
$ chtag -t -c 819 iso.txt
$ vi iso.txt (enter Hello, save then exit)
$ od -X iso.txt
0000000000 48656C6C 6F0A0000
0000000006
Here you can see that the auto-conversion function stored the text in the correct codeset.
References:
- IBM Doc on relevant Environment Variables
- File Tagging and Conversion
add a comment |
up vote
4
down vote
accepted
There are support mechanisms for doing auto conversion based on tagging. To do what you’re interested in, I replicated your scenario on my z/OS 2.3 system. To accomplish what you want you can set _BPXK_AUTOCVT=ON
. I repeated the provided test case and then set _BPXK_AUTOCVT=ON
to demonstrate the desired behaviour worked.
$ echo > iso.txt
$ chtag -t -c 819 iso.txt
$ ls -T iso.txt
t ISO8859-1 T=on iso.txt
$ vi iso.txt (enter Hello, save then exit)
$ od -x iso.txt
0000000000 C885 9393 9615
0000000006
The word Hello is stored as EBCDIC despite having tagged the file as 819.
Next, setting _BPXK_AUTOCVT=ON
enables auto conversion.
$ export _BPXK_AUTOCVT=ON
$ echo > iso.txt
$ chtag -t -c 819 iso.txt
$ vi iso.txt (enter Hello, save then exit)
$ od -X iso.txt
0000000000 48656C6C 6F0A0000
0000000006
Here you can see that the auto-conversion function stored the text in the correct codeset.
References:
- IBM Doc on relevant Environment Variables
- File Tagging and Conversion
add a comment |
up vote
4
down vote
accepted
up vote
4
down vote
accepted
There are support mechanisms for doing auto conversion based on tagging. To do what you’re interested in, I replicated your scenario on my z/OS 2.3 system. To accomplish what you want you can set _BPXK_AUTOCVT=ON
. I repeated the provided test case and then set _BPXK_AUTOCVT=ON
to demonstrate the desired behaviour worked.
$ echo > iso.txt
$ chtag -t -c 819 iso.txt
$ ls -T iso.txt
t ISO8859-1 T=on iso.txt
$ vi iso.txt (enter Hello, save then exit)
$ od -x iso.txt
0000000000 C885 9393 9615
0000000006
The word Hello is stored as EBCDIC despite having tagged the file as 819.
Next, setting _BPXK_AUTOCVT=ON
enables auto conversion.
$ export _BPXK_AUTOCVT=ON
$ echo > iso.txt
$ chtag -t -c 819 iso.txt
$ vi iso.txt (enter Hello, save then exit)
$ od -X iso.txt
0000000000 48656C6C 6F0A0000
0000000006
Here you can see that the auto-conversion function stored the text in the correct codeset.
References:
- IBM Doc on relevant Environment Variables
- File Tagging and Conversion
There are support mechanisms for doing auto conversion based on tagging. To do what you’re interested in, I replicated your scenario on my z/OS 2.3 system. To accomplish what you want you can set _BPXK_AUTOCVT=ON
. I repeated the provided test case and then set _BPXK_AUTOCVT=ON
to demonstrate the desired behaviour worked.
$ echo > iso.txt
$ chtag -t -c 819 iso.txt
$ ls -T iso.txt
t ISO8859-1 T=on iso.txt
$ vi iso.txt (enter Hello, save then exit)
$ od -x iso.txt
0000000000 C885 9393 9615
0000000006
The word Hello is stored as EBCDIC despite having tagged the file as 819.
Next, setting _BPXK_AUTOCVT=ON
enables auto conversion.
$ export _BPXK_AUTOCVT=ON
$ echo > iso.txt
$ chtag -t -c 819 iso.txt
$ vi iso.txt (enter Hello, save then exit)
$ od -X iso.txt
0000000000 48656C6C 6F0A0000
0000000006
Here you can see that the auto-conversion function stored the text in the correct codeset.
References:
- IBM Doc on relevant Environment Variables
- File Tagging and Conversion
edited Jul 8 at 4:13
Scott
15.4k113789
15.4k113789
answered Jul 8 at 3:16
Hogstrom
1,1421120
1,1421120
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1139999%2fchtag-does-not-work-on-z-os-unix%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown