IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to convert from BI to CH


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Wed Dec 26, 2007 2:21 pm
Reply with quote

Hi,

Here is the job
Code:

//STEP010  EXEC PGM=ICETOOL                                       
//TOOLMSG  DD SYSOUT=*                                           
//DFSMSG   DD SYSOUT=*                                           
//SYSOUT   DD SYSOUT=*                                           
//SYSUDUMP DD SYSOUT=C                                           
//SYSPRINT DD SYSOUT=*                                           
//INPUT DD DSN=MY.INPUT.FILE,DISP=SHR 
//OUTPUT DD DSN=MY.OUTPUT.FILE,     
//            DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE),
//            RECFM=FB,LRECL=42,                                 
//            BLKSIZE=0                                           
//TOOLIN   DD *                                                   
  COPY FROM(INPUT) TO(OUTPUT) USING(CTL1)                   
/*                                                               
//CTL1CNTL DD *                                                   
  OUTFIL FNAMES=OUTPUT,REMOVECC,                               
  OUTREC=(1:35,7,PD,TO=ZD,LENGTH=12,13:47,3,C'       ', -       
          23:31,4,BI,TO=ZD,LENGTH=6, -                           
          29:27,4,BI,TO=UFF,LENGTH=11, -                         
          C'   ')                                                 
/*                                                               


In this one of the input field is S9(9) COMP and it should be written to output field of X(11). This is how i had given.
(29:27,4,BI,TO=UFF)
But the conversion is not working.
Cant we convert from COMP to CHAR.
If so what is the alternate solution for this.
I want to move data from COMP to CHAR.
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Wed Dec 26, 2007 2:32 pm
Reply with quote

Hi,

After searching i tried like this.
Instead of 29:27,4,BI,TO=UFF i had written as
29:27,4,BI,EDIT=(IIIIIIIIIIT)

Now it is working fine.
But the problem is the values are right alligned. They should be left alligned.
How to resolve this.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed Dec 26, 2007 9:32 pm
Reply with quote

TO=UFF is not valid. I don't know what you want the output values to look like - it's not clear what you mean by "They (the values) should be left alligned." Please show an example of the output values you expect. Use code tags so the values will align properly.

For example, do you want values like this?

Code:

12345678901
123456
52
873216


or do you want something else?
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Thu Dec 27, 2007 9:21 am
Reply with quote

Hi Frank,

One of the field in my input file is S9(9) COMP. And the same field in my output is X(11).
I want to move the values that were there in S9(9) COMP to X(11).
This is how i had given in my job:
29:27,4,BI,EDIT=(IIIIIIIIIIT)
But the data is right alligned as below.
Code:

----+----1-
   22025441
    9385786
    9385791
     102786
     102868
      82163
      82163


I want the data to be left alligned
Code:

----+----1-
22025441
9385786
9385791
102786
102868
82163
82163
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Dec 27, 2007 10:08 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//STEP010  EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//SYSUDUMP DD SYSOUT=C
//INPUT DD DSN=MY.INPUT.FILE,DISP=SHR
//OUTPUT DD DSN=MY.OUTPUT.FILE,
//            DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE)
//TOOLIN   DD *
COPY FROM(INPUT) TO(OUTPUT) USING(CTL1)
/*
//CTL1CNTL DD *
  INREC IFOUTLEN=42,
   IFTHEN=(WHEN=INIT,
    BUILD=(1:35,7,PD,TO=ZD,LENGTH=12,13:47,3,
          23:31,4,BI,TO=ZD,LENGTH=6,
          29:27,4,BI,EDIT=(IIIIIIIIIIT))),
   IFTHEN=(WHEN=INIT,OVERLAY=(29:29,11,JFY=(SHIFT=LEFT)))
/*
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Fri Dec 28, 2007 2:42 pm
Reply with quote

Thank You Frank.
Its working.
Thank You So Much.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Convert HEX to Numeric DB2 3
Search our Forums:

Back to Top