Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Condition Check for Signed Decimal to ZD conversion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Condition Check for Signed Decimal to ZD conversion
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: 3158
Location: Tucson AZ

PostPosted: Sat Feb 07, 2009 6:27 am    Post subject: Re: Condition Check for Signed Decimal to ZD conversion
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    Post subject: Re: Condition Check for Signed Decimal to ZD conversion
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    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us