Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to change the character byte to numeric in JCL/Sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Satyajit

New User


Joined: 25 Jan 2006
Posts: 27

PostPosted: Tue Mar 21, 2006 4:40 pm    Post subject: how to change the character byte to numeric in JCL/Sort
Reply with quote

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
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Mar 21, 2006 9:33 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Satyajit

New User


Joined: 25 Jan 2006
Posts: 27

PostPosted: Tue Mar 21, 2006 9:57 pm    Post subject: Re:how to change the character byte to numeric in JCL/Sort
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Mar 21, 2006 10:36 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Hritam

New User


Joined: 27 Jun 2005
Posts: 36
Location: India

PostPosted: Wed Mar 22, 2006 5:40 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Satyajit

New User


Joined: 25 Jan 2006
Posts: 27

PostPosted: Thu Mar 23, 2006 2:36 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Satyajit

New User


Joined: 25 Jan 2006
Posts: 27

PostPosted: Thu Mar 23, 2006 2:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Mar 23, 2006 10:17 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us