View previous topic :: View next topic
|
Author |
Message |
NB Gautam
New User
Joined: 29 Aug 2008 Posts: 8 Location: bhubaneswar
|
|
|
|
Hi All,
I have a file with few fields having COMP-3 usage.
Now I need to change the usage from COMP-3 to DISPLAY. I can very well do through COBOL but i need to do through JCL. Is there any JCL utilitiy to do this job.
can anyone help? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Why do you think you need to change these fields? |
|
Back to top |
|
|
NB Gautam
New User
Joined: 29 Aug 2008 Posts: 8 Location: bhubaneswar
|
|
|
|
Hi Crag,
Actually i am using FILEAID to see the data of a file. But since there are some fields which are in COMP-3 format so i am unable the content properly. so i wanted to convert them in display format. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
To be able to "see" the data, use HEX ON.
It will save copying the file to merely reformat some field(s). |
|
Back to top |
|
|
NB Gautam
New User
Joined: 29 Aug 2008 Posts: 8 Location: bhubaneswar
|
|
|
|
Hi dick,
Thanks . I will use 'hex on' for seeing reformated data. Can i save reformated whole data as a different dataset so that i can downoad that new content from mainfraeme server to local PC. |
|
Back to top |
|
|
NB Gautam
New User
Joined: 29 Aug 2008 Posts: 8 Location: bhubaneswar
|
|
|
|
Hi frank,
Thanks for sending link. I read the document specified in Link.
Suppose there is one variable defined as
WS-VAR1 PIC 9(11) COMP-3
So what will be JCL statement syntax to convert them in DISPLAY format.
I want it in more detail. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Now that we understand what you really need to do, yes, you need to convert the data.
I believe zoned decimal will not work for you as the pc will not handle the "zone". . .
You need to reformat the data so that a negative is a minus sign rather than a zoned sign.
Look at this previous topic that does the same thing you need to do:
ibmmainframes.com/viewtopic.php?t=31302 |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Suppose there is one variable defined as
WS-VAR1 PIC 9(11) COMP-3
So what will be JCL statement syntax to convert them in DISPLAY format.
|
That would be a 6-byte PD field starting at position 1. If you want to convert it to an 11-byte ZD field you could use these DFSORT statements:
Code: |
OPTION COPY
INREC BUILD=(1,6,PD,TO=ZD,LENGTH=11)
|
If you want to convert it to a value with blank for a positive sign and - for a negative sign and leading zeros suppressed, you could use these DFSORT statements:
Code: |
OPTION COPY
INREC BUILD=(1,6,PD,TO=FS,LENGTH=12)
|
If you want the output in some other form, show what you want it to look like for +1, -1, +12345678901 and -12345678901. |
|
Back to top |
|
|
NB Gautam
New User
Joined: 29 Aug 2008 Posts: 8 Location: bhubaneswar
|
|
|
|
HI All,
Thanks a lot. I got solution for the issue. |
|
Back to top |
|
|
krupagk
New User
Joined: 07 Aug 2010 Posts: 13 Location: Hyderabad
|
|
|
|
Thanks Frank for your solution |
|
Back to top |
|
|
ChowHan
New User
Joined: 16 Oct 2009 Posts: 15 Location: India
|
|
|
|
Err.... you could use the print option in fileaid menu to print this file to a dataset, provided the file does not have occurs depending on or redefines clause... That is ... if this is for a one time use (validation purposes) that way you will get field names as a header as well and you wouldn't have to create a header and this would be easily ported to a spreadsheet . But since you have already decided on a solution so be it... |
|
Back to top |
|
|
|