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

IFTHEN & BUILD - If keyword match, shift data to new pos


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

New User


Joined: 09 Mar 2015
Posts: 4
Location: USA

PostPosted: Wed Mar 18, 2015 1:21 am
Reply with quote

I have a situation here where I can't seem to find any manual or reference to explain the BUILD= parm as part of the ICEMAN tool.

What I'm trying to do is to perform a IFTHEN where if I have a record match on certain value (DCC:), I want to move this date from one position to another position in an attempt to align with other dates.

In below input file example, I want to shift the DCC's record's date from position 149 to position 120

BEFORE FILE:
Code:
1
0
0----+----1----+----2----+----3----+----4----+----5----+----6----
   ;HLASM V10 R62 . .20141223111836
   ;HLASM V10 R62 . .20141223113413         
   ;DCC: (Dignus) 1.96.41 Feb 24 2014 14:38:05  . .20141223113414


DESIRED OUTPUT:
Code:
1
0
0----+----1----+----2----+----3----+----4----+----5----+----6----
   ;HLASM V10 R62    20141223111836
   ;HLASM V10 R62    20141223113413
   ;DCC: (Dignus)    20141223113414


This is what I have so far and this is where I'm not sure how to code the BUILD=
Code:
OPTION COPY                             
INREC IFTHEN=(WHEN=(104,4,CH,EQ,C'DCC:')),         
      BUILD=(?????)   


If any expert here could point me to the manual that shows all I need to know about the BUILD= parm, I'd appreciate.

If you are able to help me with the answer, I'd appreciate it very much.

I've spent too much time trying to find the manual. Even the IBM's manual was not helpful.
http://www-01.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.icea100/progdd.htm?lang=en

Also if there is an IBM Manual expert here, can you explain to me how can I do a search within that manual, not the entire IBM Manual site but just that DFSORT/ICETOOL manual in the link above, I'd appreciate it. The thing is that when I typed BUILD in the top Search box, it searched the entire IBM Manual site which is not what I wanted.

Thank you very much.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Mar 18, 2015 1:36 am
Reply with quote

start from ...
www-03.ibm.com/systems/z/os/zos/library/bkserv/index.html
and proceed to ...
www-01.ibm.com/support/knowledgecenter/#!/SSLTBW_2.1.0/com.ibm.zos.v2r1/en/homepage.html
and to ...
www-01.ibm.com/support/knowledgecenter/#!/SSLTBW_2.1.0/com.ibm.zos.v2r1.ice/ice.htm
Back to top
View user's profile Send private message
rinsio

New User


Joined: 16 Feb 2015
Posts: 13
Location: Madrid, Spain

PostPosted: Wed Mar 18, 2015 2:28 pm
Reply with quote

Hello ROACH_MF

The parameter BUILD works like OUTREC.

In your case this sort card could be useful.

Code:
//SORTIN   DD *                                                     
  ;HLASM V10 R62   20141223111836                                   
  ;HLASM V10 R62   20141223113413                                   
  ;DCC: (DIGNUS) 1.96.41 FEB 24 2014 14:38:05     20141223111836     
/*                                                                   
//SYSIN    DD *                                                     
    SORT  FIELDS=COPY                                               
 OPTION COPY                                                         
 INREC IFTHEN=(WHEN=(4,4,CH,EQ,C'DCC:'),                             
    BUILD=(1,16,3X,51,14,47X))                                       
/*                                             


The output

Code:

----+----1----+----2----+----3----+----4-
********************************* Top of
  ;HLASM V10 R62   20141223111836       
  ;HLASM V10 R62   20141223113413       
  ;DCC: (DIGNUS)   20141223111836       
******************************** Bottom o



I am supposing the data starts at first pos, you have to adapt it to your need.

There is a manual sorpdug.pdf in internet with useful information


Best regards

Code'd
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Mar 18, 2015 3:02 pm
Reply with quote

BUILD is the same as FIELDS on INREC, FIELDS on OUTREC and OUTREC on OUTFIL.

See here.
Back to top
View user's profile Send private message
Roach_MF

New User


Joined: 09 Mar 2015
Posts: 4
Location: USA

PostPosted: Thu Mar 19, 2015 8:16 pm
Reply with quote

Thanks Rinsio and Bill again! Much appreciated.

I get it now in regard to the BUILD parameter which no different from doing an INREC or OUTREC FIELDS= which I have done that many times.

It's really nice to use this IFTHEN feature. Am surprised at myself for not knowing about this years ago.

Thanks!

--R
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 Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
Search our Forums:

Back to Top