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
Why my Sort is not extracting data from a VBA file
-
- Posts: 18
- Joined: Fri Feb 15, 2019 5:41 am
- Skillset: Data analytics with SMF records!
- Referer: Looking thru the internet
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: Why my Sort is not extracting data from a VBA file
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 will NEVER find a match -- it should be 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.
Code: Select all
INCLUDE COND=(1,8,CH,EQ,C'PRTRCATA')
Code: Select all
INCLUDE COND=(5,8,CH,EQ,C'PRTRCATA')
-
- Posts: 18
- Joined: Fri Feb 15, 2019 5:41 am
- Skillset: Data analytics with SMF records!
- Referer: Looking thru the internet
Re: Why my Sort is not extracting data from a VBA file
Hello Robert!
Thanks for your soon response
I tried what you said, but it still extracting nothing
this is what I applied
AND
This is the SYSOUT message
Thanks for your soon response
I tried what you said, but it still extracting nothing
this is what I applied
Code: Select all
SORT FIELDS=COPY
INCLUDE COND=(5,8,CH,EQ,C'PRTRCATA')
OUTREC FIELDS=(1,4,5,12)
AND
Code: Select all
SORT FIELDS=COPY
INCLUDE COND=(5,8,CH,EQ,C'PRTRCATA')
OUTREC FIELDS=(1,4,5,8)
This is the SYSOUT message
Code: Select all
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
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: Why my Sort is not extracting data from a VBA file
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.
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: Why my Sort is not extracting data from a VBA file
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.
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
Regards
Nic
-
- Posts: 18
- Joined: Fri Feb 15, 2019 5:41 am
- Skillset: Data analytics with SMF records!
- Referer: Looking thru the internet
Re: Why my Sort is not extracting data from a VBA file
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
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
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: Why my Sort is not extracting data from a VBA file
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).I think the sort is not taking the include condition
Have you read what the manual says about padding and truncation when doing comparisons?
-
- Posts: 18
- Joined: Fri Feb 15, 2019 5:41 am
- Skillset: Data analytics with SMF records!
- Referer: Looking thru the internet
Re: Why my Sort is not extracting data from a VBA file
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
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
-
- Posts: 239
- Joined: Wed Dec 04, 2013 11:08 pm
- Skillset: COBOL, JCL, ISPF.
- Referer: While searching the Internet for answers.
- Location: Richfield, MN, USA
Re: Why my Sort is not extracting data from a VBA file
In the future, "Please use the code tags when posting code."
.... Terry
- 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: Why my Sort is not extracting data from a VBA file
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.
-
- Similar Topics
- Replies
- Views
- Last post
-
-
COBOL SORT - How to sort entire file first & sort by Key
by k_ekam » Thu Dec 01, 2022 12:58 pm » in IBM Cobol - 3
- 1523
-
by Robert Sample
View the latest post
Wed Dec 07, 2022 7:32 am
-
-
-
Extracting Compression Statistics from DCOLLECT
by JimStout » Wed Apr 27, 2022 6:46 pm » in Assembler - 0
- 2805
-
by JimStout
View the latest post
Wed Apr 27, 2022 6:46 pm
-
-
-
How to import a ZFS data file into VSAM catalog
by danik56 » Tue Nov 23, 2021 10:29 pm » in VSAM/SMS - 0
- 3396
-
by danik56
View the latest post
Tue Nov 23, 2021 10:29 pm
-
-
- 2
- 1422
-
by naga821
View the latest post
Fri Oct 28, 2022 7:31 pm
-
-
Split file, SORT then append records.
by Esmayeelhusen » Fri Aug 04, 2023 6:37 pm » in DFSORT/ICETOOL/ICEGENER - 10
- 4887
-
by Esmayeelhusen
View the latest post
Wed Aug 09, 2023 7:39 am
-