Why my Sort is not extracting data from a VBA file



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Why my Sort is not extracting data from a VBA file

Postby danielgp89 » Wed Oct 16, 2019 12:05 am

Hello Everyone!

I want to extract some data from a VBA File with a sort but its not extracting anything if I apply the same code with the same file but now with type FB it brings the info that I want.

If I could only use one file the easy way was to copy the VBA to an FB file an from that extract the info with the sort. The thing here is that I need to use more than 200 hundreds of VBA files concatenated in the JCL to extract the data I want.

With the VBA FILE (Doesn't bring me anything)

I use the next code

SORT FIELDS=COPY
INCLUDE COND=(1,8,CH,EQ,C'PRTRCATA')
OUTREC FIELDS=(1,8)

With the FB File (Brings me the value I want)

SORT FIELDS=COPY
INCLUDE COND=(2,8,CH,EQ,C'PRTRCATA')
OUTREC FIELDS=(2,8)

In the VBA File if I change the 1 for a 2 it brings me the annoying message of OUTREC RDW NOT INCLUDED

In the VBA File, if a make a browse the data I want is between col 1 and length 8

I don't know why is not extracting the data
danielgp89
 
Posts: 18
Joined: Fri Feb 15, 2019 5:41 am
Has thanked: 8 times
Been thanked: 0 time

Re: Why my Sort is not extracting data from a VBA file

Postby Robert Sample » Wed Oct 16, 2019 12:19 am

A VBA data set has the RDW (record descriptor word) in bytes 1 through 4; your user data does not start until byte 5. Hence
INCLUDE COND=(1,8,CH,EQ,C'PRTRCATA')
will NEVER find a match -- it should be
INCLUDE COND=(5,8,CH,EQ,C'PRTRCATA')
and the OUTREC should be bytes 1 through 12, not 1 through 8 (1 through 4 are required for the RDW, bytes 5 through 12 for your data). And using 2 through whatever on a VBA data set means you're not getting the RDW -- hence the error message you got.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Why my Sort is not extracting data from a VBA file

Postby danielgp89 » Wed Oct 16, 2019 1:19 am

Hello Robert!

Thanks for your soon response

I tried what you said, but it still extracting nothing

this is what I applied

SORT FIELDS=COPY                      
INCLUDE COND=(5,8,CH,EQ,C'PRTRCATA')  
OUTREC FIELDS=(1,4,5,12)              
 

AND

SORT FIELDS=COPY                      
INCLUDE COND=(5,8,CH,EQ,C'PRTRCATA')  
OUTREC FIELDS=(1,4,5,8)              
 

This is the SYSOUT message

SYNCSORT FOR Z/OS  3.1.1.0RI   U.S. PATENTS: 4210961, 5117495   (C) 2018 SYNCSO
                                              santander   zNALC  2.3.0        
SYNCSORT LICENSED FOR BANCO SANTANDER-MEXICO                              LICEN
ZPSort LICENSE/PRODUCT EXPIRATION DATE: 01 OCT 2020                            
CTL1CNTL :                                                                    
  SORT FIELDS=COPY                                                      0022000
  INCLUDE COND=(5,8,CH,EQ,C'PRTRCATA')                                  0023000
  OUTREC FIELDS=(1,4,5,8)                                               0024000
PARMLIST :                                                                    
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=INDD,SORTOUT=OUTDD,SORTDD=CTL1,D
NALLOC                                                                        
WER813I  INSTALLATION OPTIONS IN MFXPRMP2 WILL BE USED                        
WER428I  CALLER-PROVIDED IDENTIFIER IS "0001"                                  
WER550I  ZPCOPY EXECUTED - TYPICAL SAVINGS ARE UP TO 95% TCB TIME AND 20% ELAPS
WER276B  SYSDIAG= 18424623, 20997250, 20997250, 15771535                      
WER164B  21,216K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,            
WER164B     0 BYTES RESERVE REQUESTED, 3,748K BYTES USED                      
WER146B  64K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I  INDD     : RECFM=VBA  ; LRECL=  2000; BLKSIZE= 32760                  
WER073I  INDD     : DSNAME=SIS.SEGLOG.LISTUSR.RACF.D190821                    
WER237I  OUTREC RECORD LENGTH =    12                                          
WER110I  OUTDD    : RECFM=VBA  ; LRECL=    12; BLKSIZE= 32760                  
WER074I  OUTDD    : DSNAME=Z062089.Z062089F.J0034122.D0000103.?                
WER462I  OUTPUT LRECL DIFFERS FROM SORTOUT LRECL                              
WER410B  19,164K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE,
WER410B     0 BYTES RESERVE REQUESTED, 1,960K BYTES USED                      
WER055I  INSERT          0, DELETE      91366                                  
WER493I  ZIIP PROCESSOR USED                                                  
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                  
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                  
WER416B  INDD     : EXCP'S=80,UNIT=3390,DEV=3337,CHP=(555661626B6C1C1E,1),VOL=P
WER416B  BSAM WAS USED FOR OUTDD                                              
WER246I  FILESIZE 68,341,768 BYTES                                            
WER054I  RCD IN      91366, OUT          0                                    
WER169I  RELEASE 3.1 BATCH 0541 TPF LEVEL 1.0                                  
WER052I  END SYNCSORT - Z062089F,SETP001,,DIAG=E000,7A9C,C82D,6044,B9D2,4403,02
danielgp89
 
Posts: 18
Joined: Fri Feb 15, 2019 5:41 am
Has thanked: 8 times
Been thanked: 0 time

Re: Why my Sort is not extracting data from a VBA file

Postby Robert Sample » Wed Oct 16, 2019 1:44 am

Obviously, then, the first 4 columns of data don't have PRTRCATA in any of the records. I see the input data set name has RACF in it -- if this is a data set unloaded from a RACF database, then columns 5 through 8 will have the record type (4 bytes), followed by a space, then the RACF ID (hence it would start in column 10 for 8 bytes). Post (using Code tag) a few records from browsing the data set to make sure the format is correctly specified.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Why my Sort is not extracting data from a VBA file

Postby NicC » Wed Oct 16, 2019 1:58 am

Please use the code tags when posting code.

You are using Syncsort so you should be posting in that part of the forum. Topic being moved.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Why my Sort is not extracting data from a VBA file

Postby danielgp89 » Wed Oct 16, 2019 2:12 am

I think the sort is not taking the include condition

If I make the sort only with the

SORT FIELDS=COPY
OUTREC FIELDS=(1,4,5,10)

It brings me the next result

EXAMPLE:

$IPLEXDS
$SHUEXDS
$SHUMXP1
$SHUMXP2
@APPC
@BKSDATP
@BKSMETA
@CAUSER
@CKM
@CKM
@CKM
@DB0PQCA
@FTPADM
@FTPNUM1

But for example if I only one to extract the first value $IPLEXDS

With the next command, it doesn't bring anything

SORT FIELDS=COPY
INCLUDE COND=(5,10,CH,EQ,C'$IPLEXDS')
OUTREC FIELDS=(1,4,5,10)

I don't know if the problem is the INCLUDE COND
danielgp89
 
Posts: 18
Joined: Fri Feb 15, 2019 5:41 am
Has thanked: 8 times
Been thanked: 0 time

Re: Why my Sort is not extracting data from a VBA file

Postby Robert Sample » Wed Oct 16, 2019 2:35 am

I think the sort is not taking the include condition
In other words, rather than believe you're doing something wrong, you will believe that a product used millions of times every day around the world SOMEHOW fails to work for you (and only you).

Have you read what the manual says about padding and truncation when doing comparisons?
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Why my Sort is not extracting data from a VBA file

Postby danielgp89 » Wed Oct 16, 2019 5:21 am

I fixed the issue

The problem was that the data starts at cols 6

SORT FIELDS=COPY
INCLUDE COND=(6,8,CH,EQ,C'Z062089')

Thanks for the help Robert
danielgp89
 
Posts: 18
Joined: Fri Feb 15, 2019 5:41 am
Has thanked: 8 times
Been thanked: 0 time

Re: Why my Sort is not extracting data from a VBA file

Postby Terry Heinze » Wed Oct 16, 2019 6:59 pm

In the future, "Please use the code tags when posting code."
.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times

Re: Why my Sort is not extracting data from a VBA file

Postby sergeyken » Wed Oct 16, 2019 7:41 pm

danielgp89 wrote:The problem was that the data starts at cols 6
INCLUDE COND=(6,8,CH,EQ,C'Z062089')

This MUST be obvious for anyone who has ever seen computer more than once in his life (except of playing computer games).

Whenever INCLUDE is "not working", then try to temporary delete it (or comment-out it), and carefully verify what are the data values, and their exact positions!!!

This approach must have been learned within the first 5-10 hours of any Computer Science classes.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 436
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post