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
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm


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