View previous topic :: View next topic
|
Author |
Message |
useit
Active User
Joined: 05 Oct 2006 Posts: 152
|
|
|
|
hi,
Have the below requirement in my project. Input file has both PBS(6112) and PBL (3031)item. If PBS item then we have to move zeroes to date field.(1-8 is date field)
input:
.................. 99999999999999999
20190529090707000212500347756673031UN
20190529090707000412500217280246162UN
20190529090707000512500217280306162UN
output :
.................. 99999999999999999
20190529090707000212500347756673031UN
00000000090707000412500217280246162UN
00000000090707000512500217280306162UN
IFTHEN doesnt suport in MICROFOCUS We are not able to do this.if IFTHEN supports then would have tried below syntax
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(32,4,ZD,EQ,6162),OVERLAY=(1:8C'0'))
do we have any other option/syntax alternate to IFTHEN?
regards,
useit |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10884 Location: italy
|
|
|
|
are You asking a DFSORT question or a MICROFOCUS question ??? |
|
Back to top |
|
|
useit
Active User
Joined: 05 Oct 2006 Posts: 152
|
|
|
|
Hi,
i just need to know can we achieve this logic without using IFTHEN? i tried doing it through FINDREP command as well but no luck:(
Regards,
Useit |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Please use code tags.
Try CHANGE and NOMATCH. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
You have not answered the question asked by Enrico. As you are asking for an alternative to IFTHEN, because MicroFocus does not support it, I have to assume that you are wanting a MicroFocus solution. As this is not a DFSort question I have moved the topic to a more relevant part of the forum.
And, as Rohit has said, please use the code tags when presenting data - after 13 years as a forum member you should know this, and how to do it. |
|
Back to top |
|
|
useit
Active User
Joined: 05 Oct 2006 Posts: 152
|
|
|
|
Enrico,
i am asking a DFSORT question. but MICROFOCUS doesent support IFTHEN and FINDREP. I could not think of any other solution. tried with CHANGE option but in CHANGE can we change based on some condition?
say for example
if 32,4, "6112" Then make 1 to 8 position as 0?
please let me know your view.i would be really thankful if you can help me in this regard
Regards,
useit |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
You need to look in the manuals yourself and spend that much time to see how CHANGE works.
What have you tried you CHANGE and what did not work? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10884 Location: italy
|
|
|
|
Quote: |
i am asking a DFSORT question. |
so why should we waste time on alternatives when IFTHEN works well on DFSORT |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
am asking a DFSORT question. but MICROFOCUS doesent support IFTHEN and FINDREP. |
This makes absolutely no sense. If you are asking a DFSORT question, WHY ARE YOU TALKING ABOUT MICROFOCUS? MICROFOCUS is a separate company totally unrelated to IBM and its DFSORT product. So, either you are not explaining what you are trying to do very clearly, or you are SERIOUSLY confused about what product does what.
Furthermore, since MICROFOCUS makes a vast number of products, not specifying which of their products you are referring to makes your entire statement about MICROFOCUS meaningless. |
|
Back to top |
|
|
|