Issue unpacking fields

Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL
bendiesel
Posts: 1
Joined: Mon Feb 18, 2013 11:01 pm
Skillset: basic JCL, ACR
Referer: google

Issue unpacking fields

Postby bendiesel » Sat Apr 11, 2020 2:05 am

Hi All-

I am trying to copy an existing dataset and unpack any packed fields. I ran into an issue where some of fields that where defined as packed were simply left as BLANKs, so I would like to print them out as BLANK vs the packed interpretation. When I tried the attached code (which is a simplified representation of what Im working with), it evaluates the first clause, but it does appear to evaluate the second clause where the overlay happens. Any suggestions?

I've toyed around with the selection logic, even duplicating the top clause into the bottom clause, but Im not able to get both clauses to evaluate - just the top.

Be kind here.. Im very inexperienced with SORT :)

Thanks in advance,
Ben


Code: Select all


//SYSIN    DD *                        
  OPTION COPY                          
  INREC IFTHEN=(WHEN=(12,1,CH,EQ,C'A'),
               BUILD=(1,3,            
                     4,1,              
                     5,7,              
                     12,1,          
                     13,3,            
                     16,2,PD,M11),HIT=NEXT),        
         IFTHEN=(WHEN=(12,1,CH,EQ,C'A',AND,16,2,PD,NE,NUM),
                OVERLAY=(16:C'   '),                                  
 

User avatar
sergeyken
Posts: 458
Joined: Wed Jul 24, 2019 10:12 pm
Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
Referer: Internet search

Re: Newbie Sort Question..

Postby sergeyken » Sun Apr 12, 2020 12:05 am

You try to unpack your PD field in your first IFTHEN - before it is verified against correct NUM format in your second IFTHEN.

The problem is not in your SORT experience; the problem is in your (mis)understanding of the program logic, whatever language/utility/tool you try to use.
Javas and Pythons come and go, but JCL and SORT stay forever.


  • Similar Topics
    Replies
    Views
    Last post