I need to replace 'AMAP' to some othe value (say XXXX) only for records '10092200' in 17th position. I tried OUTREC with IFTHEN but was not able to run it through. Any help appreciated.
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+
********************************* Top of Data *********
INVTADI6PO 103910077127 AMAP 00
INVTADI8 103910092200 AMAP 00
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello Alan and welcome to the forums,
Quote:
I tried OUTREC with IFTHEN but was not able to run it through. Any help appreciated.
For someone to help, you need to post the jcl, sort control statements, and any diagnostic info presented by the problem run. You also need to explain if there were unexpected/incorrect results.
I tried using the above code and it gives me SYNTAX ERROR for IFTHEN, and from the other posts I believe I need release 1.3 in order to use IFTHEN feature.
Now is there a different of changing the record without IFTHEN.
Also there is another small change in requirement, for the below two records, I need AMAP to be changed to XXXX only if 'PO' falls in 9th position and '10092200' falls in 17th position.
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+
********************************* Top of Data *********
INVTADI6PO 103910092200 AMAP 00
INVTADI6 103910092200 AMAP 00
I believe I should run 3 sorts, first to split the files with records to change in one file, change it in that file and again merge it with the other file. But I fear the order of records might be changed.
----+----1----+----2----+----3----+----4----+----5----+----6----+
********************************* Top of Data ********
INVTADI6PO 103910092200 AMAP 00
INVTADI6 103910092200 AMAP 00
********************************* TOP OF DATA **************
SYNCSORT FOR Z/OS 1.1BR TPF3 U.S. PATENTS: xx,y (C) 2002 SYNC
SERVICE DELIVERY - AAAA z/OS 1.6.0
PRODUCT LICENSED FOR CPU SERIAL NUMBER GGG, MODEL 2086 150 LICEN
SYSIN :
SORT FIELDS=COPY
OUTREC FIELDS=(35,4,CHANGE=(4,'AMAP','G81A'),NOMATCH=(35,4))
*
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
******************************** BOTTOM OF DATA *************
Actaully I had got the same for IFTHEN, (Yesterday I had given the other)
Code:
********************************* TOP OF DATA **************
SYNCSORT FOR Z/OS 1.1BR TPF3 U.S. PATENTS: xx,y (C) 2002 SYNC
SERVICE DELIVERY - AAAA z/OS 1.6.0
PRODUCT LICENSED FOR CPU SERIAL NUMBER GGG, MODEL 2086 150 LICEN
SYSIN :
OPTION COPY
OUTREC IFTHEN=(WHEN=(17,8,CH,EQ,C'10092200'),
*
BUILD=(1,34,C'AMAP',38,296))
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
******************************** BOTTOM OF DATA *************
Donno where your getting stucked ..
I have checked for one of you condition (not with PO) and the JCL is the same which you have used , and it gives me the same output what your expecting . C the below code and output .
I am not able to copy the image here .. so attaching .. let me know if it works for you .
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
Quote:
I am not able to copy the image here
Rather than trying to post the image, it works better if you copy/paste the screen content into your reply and then use the "Code" tag to preserve alignment.
Please refer to some of the earlier replies in this topic to see how that works. Attachments can cause problems because several of the people who provide help here are prohibited from downloading attachments by their site admin policies.
Keep in mind that when you want to post come code/jcl/etc, you can use the "Preview" to see how your reply will appear to the forum (rather than the way it looks in the Reply editor). Once you are satisified with the appearance of your post, then clidk Submit.
I tried using the above code and it gives me SYNTAX ERROR for IFTHEN, and from the other posts I believe I need release 1.3 in order to use IFTHEN feature.
Just to clarify, IFTHEN, BUILD, and OVERLAY are supported in SyncSort for z/OS 1.2.1.0 and later.