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

convert to packed decimal based on condition


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

Active User


Joined: 30 Aug 2007
Posts: 114
Location: pune

PostPosted: Wed Aug 11, 2010 10:52 am
Reply with quote

u keep confusing between VB and FB

Code:
//SORT01   EXEC PGM=SORT                                             
//SORTIN   DD  DISP=SHR,DSN=YOURID..FB.LRECL54                       
//SORTOUT  DD  DSN=YOURID.FB.LRECL54.CNVT,                           
//             DISP=(,CATLG,DELETE),                                 
//             UNIT=SYSDA                                             
//SYSIN DD *                                                         
 INREC IFTHEN=(WHEN=(01,02,CH,EQ,C'03'),                             
        OVERLAY=(23:23,16,UFF,TO=PD,LENGTH=08,8X)),                   
        IFTHEN=(WHEN=(01,02,CH,EQ,C'05'),                             
        OVERLAY=(32:32,07,UFF,TO=PD,LENGTH=03,4X)),                   
        IFTHEN=(WHEN=(01,02,CH,EQ,C'06'),                             
        OVERLAY=(28:28,16,UFF,TO=PD,LENGTH=08,44,14,8X)),                   
        IFTHEN=(WHEN=(01,02,CH,EQ,C'07'),                             
        OVERLAY=(33:33,16,UFF,TO=PD,LENGTH=08,8X))                   
  SORT FIELDS=COPY                                                   
/*                                                                   
//SYSOUT DD SYSOUT=*                                                 
//*   
Back to top
View user's profile Send private message
pema_yozer

New User


Joined: 16 Feb 2009
Posts: 54
Location: pune

PostPosted: Wed Aug 11, 2010 12:04 pm
Reply with quote

thanks..
works perfectly
Back to top
View user's profile Send private message
pema_yozer

New User


Joined: 16 Feb 2009
Posts: 54
Location: pune

PostPosted: Wed Aug 11, 2010 12:20 pm
Reply with quote

smijoss
could you plese let me know
what 44 and 14 signify
Back to top
View user's profile Send private message
pema_yozer

New User


Joined: 16 Feb 2009
Posts: 54
Location: pune

PostPosted: Wed Aug 11, 2010 12:33 pm
Reply with quote

pema_yozer wrote:
smijoss
could you plese let me know
what 44 and 14 signify



ok it figured out.. thanks again guys
Back to top
View user's profile Send private message
smijoss

Active User


Joined: 30 Aug 2007
Posts: 114
Location: pune

PostPosted: Wed Aug 11, 2010 12:38 pm
Reply with quote

OVERLAY=(28:28,16,UFF,TO=PD,LENGTH=08,44,14,8X))

while copying, it will copy the characters from 1,28
then compress you number from posion 28 to PD and fit it in 8 bytes

in the input, your next data starts from 44 with length 14

and 8x to fill spaces at the end


you could have saved a lot of efforts if you had mentioned things clearly.
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 Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
Search our Forums:

Back to Top