Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all 8500 articles
Browse latest View live

DFSORT/ICETOOL :: RE: Next max

$
0
0
Author: Bill Woodger
Subject: Reply to: Next max
Posted: Fri Jun 17, 2016 2:30 am (GMT 5.5)

Full knowledge of the data is important. Consecutive blanks would be a problem, as well as blanks in the final record of a key.

Still, assuming those don't exist, WHEN=GROUP for the blank, with PUSH of the entire record, RECORDS=2, OUTFIL to omit the blanks, and a BUILD with the slash-operator (get the basic data, (81,80,/,1,80), a little breakdown to copy the required bytes and the literal) subordinate to a WHEN= confirming that the keys are equal should be about there.

So, can there be consecutive blanks, and if so, is there a maximum? And what would you want done? If the final record of a group is blank, what would you want done?

I can't see that the JOINKEYS needs the RESTART, just a plain sequence should do. A test for equal keys could replace the primary key and just use the sequence for the match.

But the important thing first is the data.


DFSORT/ICETOOL :: RE: Next max

$
0
0
Author: sqlcode1
Posted: Fri Jun 17, 2016 2:58 am (GMT 5.5)

RESTART is there so that rules don't cross client boundaries. GROUP/PUSH vs JOINKEY is a preference thing

Thanks,

DFSORT/ICETOOL :: RE: Next max

$
0
0
Author: Bill Woodger
Subject: Reply to: Next max
Posted: Fri Jun 17, 2016 3:06 am (GMT 5.5)

You've got the client in the for the key. What bounds would you cross?

Maybe it's preference, but I go for reading the file once unless it is needed to read it twice. Mostly.

SYNCSORT :: JOINKEYs and Variable files

$
0
0
Author: migusd
Subject: JOINKEYs and Variable files
Posted: Fri Jun 17, 2016 3:16 am (GMT 5.5)

Hello guys,
I am trying now to compare previous & current for the same file. Trying to catch the records being added, deleted and changed...
But the field I want to compare is a variable one. can be up to 255. Due to limitations on Syncsort Joinkeys, I am setting the field comparison to 64 bytes only....
Example 7 on "Exploiting Syncsort MFX: JOIN" manual is almost the one I need... except that I need the Join keys to be variable, also the input and output files...
so, according to the manual I should use REFORMAT from Section 2.234 of Programmer's Guide....

According to it, because I want the output files to be variable length to, I should add the RDW at the front of the record and the variable fields at the end without a length. I also put both variable fields at the end.
I want to exclude the identical records.
I am including RDWs from both input files, but apparently I need another RDW for each output file.
How can I solve this?

job output shows

Code:

17.25.48 JOB54633  +WER235A UBADS471,JS0030  ,       [b] -SORTOF2  OUTREC RDW NOT INCLUDED     
[/b]17.25.48 JOB54633  IEF450I UBADS471 JS0030 - ABEND=S000 U0016 REASON=00000000  117         
   117                     TIME=17.25.48                                                   
17.25.49 JOB54633  U11-656 JOBNAME=UBADS471,STPROC=        ,STSTEP=        ,AUTO SETUP PARMS                     


here is the sort

Code:
  JOIN  UNPAIRED,F1,F2                                                         
  JOINKEYS FILE=F1,FIELDS=(19,64,A)                                             
  JOINKEYS FILE=F2,FIELDS=(19,64,A)                                             
  REFORMAT FIELDS=(F1:1,004,        RDW F1                                     
                   F2:1,004,        RDW F2                                     
                   F1:05,013,       PREVIOUS TES                               
                   F2:05,013,       CURRENT TES                                 
                   F1:19,           PREVIOUS ESRIDNM                           
                   F2:19),          CURRENT ESRIDNM                           
                   FILL=X'FF'                                                   
*                  TYPE=V                                                       
  OMIT COND=(9,13,CH,EQ,22,13,CH,AND,35,255,CH,EQ,290,255,CH)                   
  SORT FIELDS=COPY                                                             
  OUTFIL FILES=1,                * DELETED ESRIDNMS                           
  INCLUDE=(9,1,BI,EQ,X'FF'),                                                   
  BUILD=(RDWD,DTES,PIP,PESR),                                                   
  HEADER2=(10:' DELETED ESRIDNMS',/,                                           
  01:'TES #',                                                                   
  15:'ESRIDNM DESCRIPTION')                                                   
  OUTFIL FILES=2,                * ADDED  ESRIDNMS                             
  INCLUDE=(022,1,BI,EQ,X'FF'),                                                 
  BUILD=(RDWA,ATES,PIP,FESR),                                                   
  HEADER2=(10:' ADDED ESRIDNMS',/,                                             
  01:'TES #',                                                                   
  15:'ESRIDNM DESCRIPTION')                                                   
* OUTFIL FILES=3,                * CHANGED ESRIDNMS                           
* INCLUDE=(022,1,BI,EQ,X'FF'),                                                 
* BUILD=(RDWDTES,PIP,DESR,PIP,ATES,PIP,FESR),                                   
* HEADER2=(10:' CHANGED ESRIDNMS',/,                                           
* 01:'TES #',                                                                   
* 15:'ESRIDNM DESCRIPTION')                                                   


Code:

DATA DICTIONARY SYMBOLS SUBSTITUTED :                                           
JOIN UNPAIRED,F1,F2                                                             
JOINKEYS FILE=F1,FIELDS=(19,64,A)                                               
JOINKEYS FILE=F2,FIELDS=(19,64,A)                                               
REFORMAT FIELDS=(F1:1,004,F2:1,004,F1:05,013,F2:05,013,F1:19,F2:19),FILL=X'FF' 
OMIT COND=(9,13,CH,EQ,22,13,CH,AND,35,255,CH,EQ,290,255,CH)                     
SORT FIELDS=COPY                                                               
OUTFIL FILES=1,INCLUDE=(9,1,BI,EQ,X'FF'),BUILD=(1,4,9,13,C'|',35,64),HEADER2=(10
:' DELETED ESRIDNMS',/,01:'TES #',15:'ESRIDNM DESCRIPTION')                   
OUTFIL FILES=2,INCLUDE=(022,1,BI,EQ,X'FF'),BUILD=(5,4,22,13,C'|',290,64),HEADER2
=(10:' ADDED ESRIDNMS',/,01:'TES #',15:'ESRIDNM DESCRIPTION')                 


Code:
WER813I  INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED                 
WER276B  SYSDIAG= 5009393, 12351294, 12351294, 9737185                         
WER164B  46,016K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER164B     0 BYTES ESRERVE REQUESTED, 1,000K BYTES USED                       
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                                 
WER481I  JOINKEYS REFORMAT RECORD LENGTH=  548, TYPE = V                       
WER235A  SORTOF2  OUTREC RDW NOT INCLUDED                                       
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                   
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                   
WER482I  JNF1 STATISTICS                                                       
WER483B  22,776K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER483B     0 BYTES ESRERVE REQUESTED, 1,000K BYTES USED                       
WER108I  SORTJNF1 : RECFM=VB   ; LRECL=   275; BLKSIZE= 27998                     


Code'd
_________________
shikoulitz

Mainframe Jobs :: Mainframe Openings for 3 to 5 years in Chennai

$
0
0
Author: muralikrishnan_new
Subject: Mainframe Openings for 3 to 5 years in Chennai
Posted: Fri Jun 17, 2016 4:48 pm (GMT 5.5)

Hi All,
We have an opening in CTS for Mainframe Developer, below are the details.

Job Function : Developer
Qualification : Any Graduate/ Post Graduate
Experience : 3 - 5
Location : Chennai

Job Description : Knowledge in JCL, DB2 ,SORT & Cobol.

If interested, please send your resume to muralikrishnan.ram@gmail.com

Thanks,
Murali
_________________
Thanks,
Murali

JCL & VSAM :: COND parameter vs IF THEN ELSE

$
0
0
Author: Alks
Subject: COND parameter vs IF THEN ELSE
Posted: Fri Jun 17, 2016 5:28 pm (GMT 5.5)

Hi,

I have a requirement of checking the existense of a file before transmitting it through NDM.

COND Parameter:
In first step I'm checking if the file exists through IDCAMS. If it exists I use the RC=0 of above step to execute step 2 i.e. CDRBATCH.
Cond=(0,NE,STEP01)
It is working fine if the file does not exist i.e. RC=4. However if the file exists, the CDRBATCH step is executed, file is transmitted BUT the inbuilt abender step is also executed and the job abends

IF THEN ELSE:
I'm just using
IF STEP01.RC = 0 THEN
STEP02 >>>> CDRBATCH step
and its working fine for both existing and non-existing file.

Am I missing something here?
_________________
Alks..!!!

JCL & VSAM :: RE: COND parameter vs IF THEN ELSE

$
0
0
Author: expat
Posted: Fri Jun 17, 2016 5:53 pm (GMT 5.5)

Where is this inbuilt abend step, you haven't shown us

What condition code execution does this step have
_________________
Some people are like Slinkies. They have no real value,
but it sure is fun to see them pushed down the stairs.

JCL & VSAM :: RE: COND parameter vs IF THEN ELSE

$
0
0
Author: Alks
Posted: Fri Jun 17, 2016 6:16 pm (GMT 5.5)

Hi expat,

The inbuilt abend step is in the CDRBATCH step.
The jcl goes like this:
//JS005 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DSN=xxxx.xxxx.controlcard(ABC),
// DISP=SHR
//JS010 EXEC CDRBATCH,COND=(0,NE,JS005)
//CDRBATCH.DMPUBLIB DD DSN=xxxx.xxxx.controlcard,
// DISP=SHR
//SYSIN DD DSN=xxxx.xxxx.controlcard(XYZ),
// DISP=SHR


The control card ABC has LISTCAT ENTRIES(DSN)
i.e. the DSN whose existense is checked.

The control card XYZ has the SNODE PNODE DSNI and DSNO details.
_________________
Alks..!!!


JCL & VSAM :: RE: COND parameter vs IF THEN ELSE

$
0
0
Author: David Robinson
Subject: Reply to: COND parameter vs IF THEN ELSE
Posted: Fri Jun 17, 2016 6:35 pm (GMT 5.5)

The CDRBATCH step is not step but a proc. Presumably that contains both the NDM transfer and your "inbuilt abender".

The COND statement that you have shown will apply to all steps in the proc. So either the NDM and abender steps will both run, or neither.

Why don't you have a COND statement on the abender step referring to the NDM step? And why do you even need an abender step?

JCL & VSAM :: RE: COND parameter vs IF THEN ELSE

$
0
0
Author: Alks
Posted: Fri Jun 17, 2016 6:45 pm (GMT 5.5)

Hello David, even I'm not very sure as how its happening.

This is what I have in JESMSG
-------------------------------------------------
Job-Name StepName ProcStep Pgm-Name CompCode Sysn
-------- -------- -------- -------- -------- ----
JOBNAME1 JS015 IDCAMS RC=0000 XYZ
-------------------------------------------------
-------------------------------------------------

Job-Name StepName ProcStep Pgm-Name CompCode Sysn
-------- -------- -------- -------- -------- ----
JOBNAME1 JS020 CDRBATCH DMBATCH RC=0000 XYZ
-------------------------------------------------
-------------------------------------------------
Job-Name StepName ProcStep Pgm-Name BelowK AboveM
-------- -------- -------- -------- ------ ------
JOBNAME1 JS020 XIABENDR XIABENDR 7522K 1035M
-------------------------------------------------
JOBNAME1 XIABENDR JS020 - ABEND=S000 U1000 REASON=00000000 661
TIME=07.12.38
-------------------------------------------------
Job-Name StepName ProcStep Pgm-Name CompCode Sysn
-------- -------- -------- -------- -------- ----
JOBNAME1 JS020 XIABENDR XIABENDR Ab-U1000 XYZ
_________________
Alks..!!!

JCL & VSAM :: RE: COND parameter vs IF THEN ELSE

$
0
0
Author: Alks
Subject: Re: Reply to: COND parameter vs IF THEN ELSE
Posted: Fri Jun 17, 2016 6:50 pm (GMT 5.5)

David Robinson wrote:
".

The COND statement that you have shown will apply to all steps in the proc. So either the NDM and abender steps will both run, or neither.

Why don't you have a COND statement on the abender step referring to the NDM step? And why do you even need an abender step?



This is my thinking as well. But I don't think I can access it. I guess this CDRBATCH having abend step is specific to my shop.
_________________
Alks..!!!

JCL & VSAM :: RE: COND parameter vs IF THEN ELSE

$
0
0
Author: Robert Sample
Posted: Fri Jun 17, 2016 7:00 pm (GMT 5.5)

Quote:
I guess this CDRBATCH having abend step is specific to my shop.
Since the entire job is specific to your shop, and nowhere else in the world, that is a good guess. If you are thinking this JCL is common, you are incorrect -- it does not exist other places. Other places have NDM, and abend procedures, but what you have is specific to your site.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

JCL & VSAM :: RE: COND parameter vs IF THEN ELSE

$
0
0
Author: Alks
Posted: Fri Jun 17, 2016 7:14 pm (GMT 5.5)

Thanks Robert for showing my place to me. But when I am using IF ENDIF to control the execution of CDRBATCH, the ABEND step is not getting triggered. This is what confusing me.

//JS005 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DSN=xxxx.xxxx.xxxx.CTC(ABC),
// DISP=SHR
// IF JS005.RC = 0 THEN
//JS010 EXEC CDRBATCH
//CDRBATCH.DMPUBLIB DD DSN=xxxx.xxxx.xxxx.CTC,
// DISP=SHR
//SYSIN DD DSN=xxxx.xxxx.xxxx.CTC(XYZ),
// DISP=SHR
// ENDIF
_________________
Alks..!!!

JCL & VSAM :: RE: COND parameter vs IF THEN ELSE

$
0
0
Author: Robert Sample
Posted: Fri Jun 17, 2016 7:25 pm (GMT 5.5)

Why would the ABEND step be triggered? You have not posted the JCL for this step, so we have no idea if it has any conditional execution or not. Depending upon the specifics of CDRBATCH, what you are saying could be entirely normal behavior and not a problem in any way.

Your best bet would be to post the CDRBATCH procedure IN ITS ENTIRETY.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

JCL & VSAM :: RE: COND parameter vs IF THEN ELSE

$
0
0
Author: Alks
Posted: Fri Jun 17, 2016 7:47 pm (GMT 5.5)

The abend condition is COND=(5,GT,CDRBATCH). If my understanding is right when CDRBATCH RC=0, the abend step should get flushed.


XXCDRBATCH PROC
XXCDRBATCH EXEC PGM=DMBATCH,PARM=(YYSLYNN)
XXSTEPLIB DD DSN=xxxx.xxxx.xxxx.LOADLIB,DISP=SHR
XXSYSUDUMP DD SYSOUT=*
//CDRBATCH.DMPUBLIB DD DSN=xxxx.xxxx.xxxx.CTC,
// DISP=SHR
X/DMPUBLIB DD DSN=xxxx.xxxx.xxxx.xxxx,DISP=SHR
XXDMMSGFIL DD DSN=xxxx.xxxx.xxxx.xxxx,DISP=SHR
XXDMNETMAP DD DSN=xxxx.xxxx.xxxx.xxxxx,DISP=SHR
XXDMPRINT DD SYSOUT=*
XXNDMCMDS DD DUMMY USED FOR DEBUGGING ONLY
//SYSIN DD DSN=xxxx.xxxx.xxxx.CTC(XYZ),
// DISP=SHR
X/SYSIN DD DUMMY <-----CONTROL STATEMENTS OVERRIDE THIS
***
XXXIABENDR EXEC PGM=XIABENDR,PARM=1000,COND=(5,GT,CDRBATCH),RD=NR
XXUCC11NR DD DUMMY USED FOR RESTART
***
*********************************************************************
*** CAUSE A USER ABEND 1000 IF RETURN CODE > 4 *
_________________
Alks..!!!


JCL & VSAM :: RE: COND parameter vs IF THEN ELSE

$
0
0
Author: RahulG31
Subject: Reply to: COND parameter vs IF THEN ELSE
Posted: Fri Jun 17, 2016 8:14 pm (GMT 5.5)

You should apply the COND to the step you want. In this case, it's the step name is CDRBATCH. So, while calling proc the condition should be COND.CDRBATCH=(0,NE) i.e.
Quote:
//JS010 EXEC CDRBATCH,COND.CDRBATCH=(0,NE)

As said earlier, the possible reason of this behavior is due to the COND being overridden. The 'IF THEN' condition doesn't override the COND and so the step would work as you want it to be.

.

JCL & VSAM :: RE: COND parameter vs IF THEN ELSE

$
0
0
Author: Robert Sample
Posted: Fri Jun 17, 2016 8:42 pm (GMT 5.5)

When you start mixing COND with EXEC of PROC as well as programs, you have to expect the unexpected. I suspect what you are seeing is based on this quote from the JCL Reference manual (emphasis added by me):
Quote:
If an EXEC statement calls a cataloged or in-stream procedure, the COND
parameter overrides the COND parameter on or is added to:
v
The EXEC statement named in the procstepname qualifier, which is to the left of
the equals sign. The parameter applies only to the named procedure step. The
EXEC statement can have as many COND.procstepname parameters as the
procedure has steps; each COND parameter must specify a unique
procstepname.
v
All EXEC statements in the procedure if procstepname is not coded. Then the
parameter applies to this job step and to all steps in the called procedure.
Since you apply the COND to the PROC execute without qualifying it, the (0,NE,JS005) is overriding the step-specific COND=(5,GT,CDRBATCH). And using the same name for one of the steps of the PROC as well as the PROC name is a really bad coding practice.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

SYNCSORT :: RE: Comparing two VB files

$
0
0
Author: migusd
Posted: Fri Jun 17, 2016 9:29 pm (GMT 5.5)

where you able to make it work?
_________________
shikoulitz

SYNCSORT :: RE: JOINKEYs and Variable files

$
0
0
Author: Rohit Umarjikar
Posted: Sat Jun 18, 2016 12:08 am (GMT 5.5)

looks like you have not included RDW , look at BUILD.
_________________
Regards,
Rohit Umarjikar
"Some things Man was never meant to know. For everything else, there's Google"

SYNCSORT :: RE: Comparing two VB files

$
0
0
Author: Rohit Umarjikar
Posted: Sat Jun 18, 2016 12:10 am (GMT 5.5)

Please don't reply to old thread instead start a new one next time.
_________________
Regards,
Rohit Umarjikar
"Some things Man was never meant to know. For everything else, there's Google"

Viewing all 8500 articles
Browse latest View live