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

Condition Check for Signed Decimal to ZD conversion


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

New User


Joined: 08 Mar 2007
Posts: 23
Location: CHENNAI

PostPosted: Sat Feb 07, 2009 5:20 am
Reply with quote

I have following sort control card

Code:
SORT FIELDS=(501,2,CH,A)                           
OUTREC BUILD=(1,104,                               
               105,13,SFF,TO=ZDC,LENGTH=11,         
               118,13,SFF,TO=ZDC,LENGTH=11,         
               131,13,SFF,TO=ZDC,LENGTH=11,         
               144,13,SFF,TO=ZDC,LENGTH=11,         
               157,13,SFF,TO=ZDC,LENGTH=11,         
               170,13,SFF,TO=ZDC,LENGTH=11,         
               183,13,SFF,TO=ZDC,LENGTH=11,         
               196,200,                             
               396,113,                             
               509,13,SFF,TO=ZDC,LENGTH=11,         
               522,13)                             

I need to put a condition on this Control card for somefields during conversion.For fields that start at 118, 131 & 144 i want to change to ZDC only if they are Non Blank (or if they are blank i want to leave them as it is )
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sat Feb 07, 2009 6:27 am
Reply with quote

manoz_k wrote:
only if they are Non Blank (or if they are blank i want to leave them as it is )
Ouch.....
Have you looked at Sort's IFTHEN parameter?
Back to top
View user's profile Send private message
manoz_k

New User


Joined: 08 Mar 2007
Posts: 23
Location: CHENNAI

PostPosted: Sat Feb 07, 2009 6:39 am
Reply with quote

Code:
SORT FIELDS=(501,2,CH,A)                           
OUTREC BUILD=(1,104,                               
               105,13,SFF,TO=ZDC,LENGTH=11,         
               118,13,SFF,TO=ZDC,LENGTH=11,         
               131,13,SFF,TO=ZDC,LENGTH=11,---> I want to do this only when its non blank         
               144,13,SFF,TO=ZDC,LENGTH=11,---> I want to do this only when its non blank                 
               157,13,SFF,TO=ZDC,LENGTH=11,---> I want to do this only when its non blank                 
               170,13,SFF,TO=ZDC,LENGTH=11,         
               183,13,SFF,TO=ZDC,LENGTH=11,         
               196,200,                             
               396,113,                             
               509,13,SFF,TO=ZDC,LENGTH=11,         
               522,13)                             

I believe IFTHEN does a Reformat different records in different ways ? But not the same record in different ways ? Please correct me if i am wrong >>Thanks much !!!
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Sat Feb 07, 2009 6:50 am
Reply with quote

manoz_k,

Assuming that you want to reduce the blank fields from 13 blanks to 11 blanks, try these control cards

Code:

//SYSIN    DD *
  SORT FIELDS=(501,2,CH,A)                               
  OUTREC IFOUTLEN=518,
  IFTHEN=(WHEN=INIT,                               
  BUILD=(001,104,                                         
         105,013,SFF,TO=ZDC,LENGTH=11,                   
         118,013,SFF,TO=ZDC,LENGTH=11,                   
         33X,                                             
         170,13,SFF,TO=ZDC,LENGTH=11,                     
         183,13,SFF,TO=ZDC,LENGTH=11,                     
         196,200,                                         
         396,113,                                         
         509,13,SFF,TO=ZDC,LENGTH=11,                     
         522,13,                                         
         131,39)),                                       
  IFTHEN=(WHEN=(519,13,CH,NE,C' '),                       
  OVERLAY=(127:519,13,SFF,TO=ZDC,LENGTH=11),HIT=NEXT),   
  IFTHEN=(WHEN=(532,13,CH,NE,C' '),                       
  OVERLAY=(138:532,13,SFF,TO=ZDC,LENGTH=11),HIT=NEXT),   
  IFTHEN=(WHEN=(545,13,CH,NE,C' '),                       
  OVERLAY=(149:545,13,SFF,TO=ZDC,LENGTH=11))     
/*
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SCOPE PENDING option -check data DB2 2
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
Search our Forums:

Back to Top