View previous topic :: View next topic
|
Author |
Message |
Satyajit
New User
Joined: 25 Jan 2006 Posts: 27
|
|
|
|
Hi
My program has a date field which is signed.hence report that comes out from the program contains the last byte as character instead of integer.
i.e 20060321 is coming as 2006032A.Whenever I HEX ON I can see the integer right there. I want the integer i.e. the format should be 20060321
by jcl only;no change should be done to the program from where its coming.
can anyone help |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Your Subject line implies you are using Sort for your report, but your post refers to "the program". By program, do you mean the Sort product?
If so, then you need to show the parameters you're using to display the date (or just show all of statements you're using to get the "report"). |
|
Back to top |
|
|
Satyajit
New User
Joined: 25 Jan 2006 Posts: 27
|
|
|
|
the "program means" a separate COBOL Program which is producing a report file and the date field in this program is signed.In the report file the date field is 2006022A instead of 20060221.I have to format this report file an produce another report file which will give the actual date i.e. 20060221. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
In order to tell you how to change the report file, I need to know what the report file looks like, and how to identify the record in the report file that contains the date. Show me an example of the report file records. Also, what is the RECFM and LRECL of the report file? |
|
Back to top |
|
|
Hritam
New User
Joined: 27 Jun 2005 Posts: 36 Location: India
|
|
|
|
Hi Satya,
If i guess right then you have a field of 8 charachters. There you want to change that last byte of it from X'C1' to X'F1'. For that you have to use the some useful functions of DFSORT (Not present in Syncsort)
"http://www-03.ibm.com/servers/storage/support/software/sort/mvs/beyond_sorting/online/srtmboft.html#boi"
Hope this will help you.
And as mentioned if you need any more help, you have to mention your requirements more clearly. |
|
Back to top |
|
|
Satyajit
New User
Joined: 25 Jan 2006 Posts: 27
|
|
|
|
the report file looks like this
EFF DATE
2006022C
after doing the hex on i find...
EFF DATE
CCC4CCEC
56604135
--------
44444444
00000000
--------
2006022C
FFFFFFFC
20060223
I want thi final report like this...
EFF DATE
20060223 |
|
Back to top |
|
|
Satyajit
New User
Joined: 25 Jan 2006 Posts: 27
|
|
|
|
sorry to mention that the RECFM of I/P is FB LRECL is 80
O/P is also FB & LRECL is 80 |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use the following DFSORT job to do what you asked for.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/80)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(1,1,CH,EQ,C'2'),
OVERLAY=(8:8,1,ZD,TO=ZDF))
/*
|
This will change Cd to Fd for the last byte, making it printable. Note that for DFSORT, TO=ZD will work as well since DFSORT uses an F sign for TO=ZD. |
|
Back to top |
|
|
|