Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
HELP sort -build-

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
theone1987

New User


Joined: 14 Sep 2009
Posts: 60
Location: Milan

PostPosted: Mon Nov 09, 2009 2:25 pm    Post subject: HELP sort -build-
Reply with quote

can someone explain me what doest it means?

Code:

 INREC IFTHEN=(WHEN=(147,1,CH,EQ,C'-'),                   
   BUILD=(1:62,40,41:122,10,51:166,10,61:153,10,290:C'1')),
  IFTHEN=(WHEN=NONE,                                       
   BUILD=(1:9,40,41:49,10,51:59,10,61:69,10,290:C'2'))     
 OUTFIL FNAMES=OUT,INCLUDE=(290,1,CH,EQ,C'1'),BUILD=(1,290)


tnks
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Nov 09, 2009 10:49 pm    Post subject:
Reply with quote

I can tell you what the statements do, but without knowing what the input records look like, what you are trying to accomplish and what the expected output is, I can't tell you why those control statements are being used.

INREC statement: If position 147 has a C'-', do the first BUILD. Otherwise do the second BUILD.

BUILD: Creates a reformatted record from the input record.

c:p,m -> e.g. 41:122,10
c: -> the output position.
p -> the starting position of the input field
m -> the length of the input field

OUTFIL: If position 290 of the reformatted record has a C'1', write the record to the output file. Otherwise, discard the reformatted record.

This seems like an overly complex way to get the result. I would think that this would be better (unless there's something more going on then you're saying):

Code:

   INCLUDE COND=(147,1,CH,EQ,C'-')
   OUTFIL FNAMES=OUT,
      BUILD=(1:62,40,41:122,10,51:166,10,61:153,10,290:C'1')
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 SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us