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 convert from BI to CH

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

Active User


Joined: 01 Feb 2007
Posts: 120
Location: USA

PostPosted: Wed Dec 26, 2007 2:21 pm    Post subject: How to convert from BI to CH
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: 120
Location: USA

PostPosted: Wed Dec 26, 2007 2:32 pm    Post subject: Reply to: How to convert from BI to CH
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 Moderator


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

PostPosted: Wed Dec 26, 2007 9:32 pm    Post subject:
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: 120
Location: USA

PostPosted: Thu Dec 27, 2007 9:21 am    Post subject: Reply to: How to convert from BI to CH
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 Moderator


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

PostPosted: Thu Dec 27, 2007 10:08 pm    Post subject:
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: 120
Location: USA

PostPosted: Fri Dec 28, 2007 2:42 pm    Post subject: Reply to: How to convert from BI to CH
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    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 Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm

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