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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: IFTHEN & BUILD - If keyword match, shift data to new pos
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Mar 18, 2015 1:36 am    Post subject: Reply to: IFTHEN & BUILD - If keyword match, shift data to new pos
Reply with quote

start from ...
http://www-03.ibm.com/systems/z/os/zos/library/bkserv/index.html
and proceed to ...
http://www-01.ibm.com/support/knowledgecenter/#!/SSLTBW_2.1.0/com.ibm.zos.v2r1/en/homepage.html
and to ...
http://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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Wed Mar 18, 2015 3:02 pm    Post subject: Reply to: IFTHEN & BUILD - If keyword match, shift data to new pos
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    Post subject: Reply to: IFTHEN & BUILD - If keyword match, shift data to new pos
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    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 Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 1 Tue Dec 06, 2016 4:38 am
No new posts How to move a long alphanumeric data ... lind sh COBOL Programming 6 Mon Dec 05, 2016 7:51 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 5 Fri Dec 02, 2016 9:47 am
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


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