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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts Filter records where condition is in ... SYNCSORT 6
No new posts Extract records for a specific condit... DFSORT/ICETOOL 25
No new posts Write record twice based on condition... SYNCSORT 7
No new posts Setting RC using NULLOFL/NOTMTOFL for... SYNCSORT 6
No new posts Convert CSV to flat file. DFSORT/ICETOOL 6
Search our Forums:


Back to Top