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

DO we have alternate syntax for IFTHEN?


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
useit

Active User


Joined: 05 Oct 2006
Posts: 151

PostPosted: Wed May 29, 2019 3:50 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10756
Location: italy

PostPosted: Wed May 29, 2019 3:55 pm
Reply with quote

are You asking a DFSORT question or a MICROFOCUS question ???
Back to top
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 151

PostPosted: Wed May 29, 2019 4:09 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2627
Location: NYC,USA

PostPosted: Wed May 29, 2019 5:19 pm
Reply with quote

Please use code tags.
Try CHANGE and NOMATCH.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed May 29, 2019 5:25 pm
Reply with quote

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
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 151

PostPosted: Fri May 31, 2019 10:14 am
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2627
Location: NYC,USA

PostPosted: Fri May 31, 2019 10:15 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10756
Location: italy

PostPosted: Fri May 31, 2019 1:01 pm
Reply with quote

Quote:
i am asking a DFSORT question.

so why should we waste time on alternatives when IFTHEN works well on DFSORT icon_question.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8569
Location: Dubuque, Iowa, USA

PostPosted: Fri May 31, 2019 6:02 pm
Reply with quote

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
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 -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Add column to existing records using ... JCL & VSAM 2
This topic is locked: you cannot edit posts or make replies. issue with Syntax error SYNCSORT 2
No new posts IFTHEN : Is there a better way? DFSORT/ICETOOL 7
No new posts Outrec IFTHEN builds data in wrong po... DFSORT/ICETOOL 6
No new posts IFTHEN HIT=NEXT BUILR should create m... DFSORT/ICETOOL 5
Search our Forums:

Back to Top