Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DO we have alternate syntax for IFTHEN?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
View previous topic :: :: View next topic  
Author Message
useit

Active User


Joined: 05 Oct 2006
Posts: 150

PostPosted: Wed May 29, 2019 3:50 pm    Post subject: DO we have alternate syntax for IFTHEN?
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

Senior Member


Joined: 14 Mar 2007
Posts: 10632
Location: italy

PostPosted: Wed May 29, 2019 3:55 pm    Post subject: Reply to: DO we have alternate syntax for IFTHEN?
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: 150

PostPosted: Wed May 29, 2019 4:09 pm    Post subject: Reply to: DO we have alternate syntax for IFTHEN?
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

Senior Member


Joined: 21 Sep 2010
Posts: 2299
Location: NY,USA

PostPosted: Wed May 29, 2019 5:19 pm    Post subject:
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: 2247
Location: Hampshire, UK

PostPosted: Wed May 29, 2019 5:25 pm    Post subject: Reply to: DO we have alternate syntax for IFTHEN?
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: 150

PostPosted: Fri May 31, 2019 10:14 am    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 2299
Location: NY,USA

PostPosted: Fri May 31, 2019 10:15 am    Post subject:
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

Senior Member


Joined: 14 Mar 2007
Posts: 10632
Location: italy

PostPosted: Fri May 31, 2019 1:01 pm    Post subject: Reply to: DO we have alternate syntax for IFTHEN?
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: 8499
Location: Dubuque, Iowa, USA

PostPosted: Fri May 31, 2019 6:02 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ALTERNATE RECORD KEY usage for KSDS AIX sophia.lee COBOL Programming 1 Thu Jul 25, 2019 7:28 am
No new posts INREC IFTHEN question knobi SYNCSORT 2 Mon Apr 15, 2019 11:55 pm
No new posts OUTREC w. several IFTHEN variants Auryn DFSORT/ICETOOL 2 Thu Jul 19, 2018 8:11 pm
No new posts Incorrect output after build alternat... sandeep kumar302 JCL & VSAM 10 Wed May 02, 2018 2:35 pm
No new posts IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 12 Tue Apr 17, 2018 10:42 pm

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