IEBUPDTE to update 1st record in a JOB library



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

IEBUPDTE to update 1st record in a JOB library

Postby Steve Coalbran » Tue May 08, 2018 3:00 pm

This is embarassing. I think the last IEBUPDTE I ran was a card deck!
I am after an example of the controls required to update the JOB card for a huge number of members of several JCL libraries.
Of course I could do this in REXX but I am guessing that IEBUPDTE would be a tad faster?
I have been trawling the IBM manuals for examples but so far come up empty.
Steve
User avatar
Steve Coalbran
 
Posts: 114
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 8 times
Been thanked: 1 time

Re: IEBUPDTE to update 1st record in a JOB library

 

Re: IEBUPDTE to update 1st record in a JOB library

Postby Steve Coalbran » Tue May 08, 2018 3:36 pm

First highly unsuccessful attempt! :(
IEF033I  JOB/N472730A/STOP  2018128.1201                                      
         CPU:     0 HR  00 MIN  00.01 SEC    SRB:     0 HR  00 MIN  00.00 SEC  
1       SYSIN                            NEW MASTER                            
-       ./     CHANGE   NAME=JOBACUPT,LIST=ALL,UPDATE=INPLACE                  
        ./     NUMBER   SEQ1=ALL,NEW1=1,INCR=1                                  
 IEB802I I/O ERROR N472730A,STEP1   ,D7C1,D,SYSUT1  ,READ  ,OUT OF EXTENT  ,TTR
,***,*******,**********,00000008,0F055142,03                                    
 IEB818I HIGHEST CONDITION CODE WAS 00000012                                    
 IEB819I END OF JOB IEBUPDTE.                                                  
******************************** BOTTOM OF DATA ********************************
Steve
User avatar
Steve Coalbran
 
Posts: 114
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 8 times
Been thanked: 1 time

Re: IEBUPDTE to update 1st record in a JOB library

Postby NicC » Tue May 08, 2018 6:25 pm

JCL? What you have so far (from reading the example in the manual) is OK. Just the data statement not shown. But is your PDS OK?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2744
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 110 times

Re: IEBUPDTE to update 1st record in a JOB library

Postby Steve Coalbran » Tue May 08, 2018 6:46 pm

Thanks Nic.
//A123456C JOB (SJ,P),'JOB AC CHANGE',CLASS=A,MSGCLASS=O,REGION=0M,
//         MSGLEVEL=(1,1),NOTIFY=&SYSUID,TIME=1440                  
/*JOBPARM  L=999999,CARDS=99999999                                  
//STEP1    EXEC PGM=IEBUPDTE,PARM=MOD                              
//SYSPRINT DD SYSOUT=*                                              
//SYSUT1   DD DISP=SHR,DSN=N472730.USER.JCL                        
//SYSIN    DD DATA,DLM='\\'                                        
./ CHANGE  NAME=JOBACUPT,LIST=ALL,UPDATE=INPLACE,SEQFLD=738        
./ NUMBER  SEQ1=00000001,NEW1=00000002,INCR=1                      
//A123456D JOB (SJ,P),'TEST AC CHANGE',CLASS=A,MSGCLASS=O            
\\

Everything I try gives RC=12 :roll: (time I retired?! :lol:)
Steve
User avatar
Steve Coalbran
 
Posts: 114
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 8 times
Been thanked: 1 time

Re: IEBUPDTE to update 1st record in a JOB library

Postby NicC » Tue May 08, 2018 6:52 pm

Steve,
I do not see the sequence number thet it is supposed to replace. From the manual:
Data statement 1, sequence number 00000020


Don't know why you haven't retired!
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2744
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 110 times

Re: IEBUPDTE to update 1st record in a JOB library

Postby steve-myers » Tue May 08, 2018 6:57 pm

Steve - I use IEBUPDTE quite a lot since it gives me a much higher degree of control over sequence numbers than ISPF, but only rarely UPDATE=INPLACE. Also, your use of SEQ1=ALL intrigued me; In 50+ years I've never used it

This seems rather baroque, but I did not want to risk damaging my source data set; this worked.

//A       EXEC PGM=IEBCOPY
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
 C I=SYSUT1,O=SYSUT2
 S M=ADMIN
//SYSUT1   DD  DISP=SHR,DSN=&SYSUID..CNTL
//SYSUT2   DD  DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,(1,1,1))
//B       EXEC PGM=IEBUPDTE
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DISP=(OLD,PASS),DSN=*.A.SYSUT2
//SYSIN    DD  *
./ CHANGE NAME=ADMIN,UPDATE=INPLACE
./ NUMBER SEQ1=ALL,NEW1=10,INCR=10
//C       EXEC PGM=IEBPTPCH
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DISP=(OLD,PASS),DSN=*.A.SYSUT2
//SYSUT2   DD  SYSOUT=*
//SYSIN    DD  *
 PRINT TYPORG=PO,MAXFLDS=1
 RECORD FIELD=(80,1,,21)
//D       EXEC PGM=TRACKSUM
//STEPLIB  DD  DISP=SHR,DSN=&SYSUID..LOAD
//SYSPRINT DD  SYSOUT=*
//INPUT    DD  DISP=(OLD,DELETE),DSN=*.A.SYSUT2


The TRACKSUM program in step D is a private utility to list a summary of the contents of the tracks in the input data set. I ran it to verify it really did the update in place. Its output was -
RELATIVE TRK  BYTES USED  UNUSED BYTES  TRK BALANCE  RECORD LENGTHS  
------------  ----------  ------------  -----------                  
 0000     0   0748  1864   DE5A 56922    D23E 53822  (8,256),0,1600,0
The (8,256) is the PDS directory; the 0 length record represents a DASD EOF record
steve-myers
Global moderator
 
Posts: 1916
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 206 times

Re: IEBUPDTE to update 1st record in a JOB library

Postby Steve Coalbran » Tue May 08, 2018 7:35 pm

NicC wrote:Steve,
I do not see the sequence number...
I don't know. There are many libraries to process. I have no idea if the member I am updating is NUM ON or NUM OFF or UNNUM.
I just want to update the first record, in this case the JOB card. Thinking it would probably be #1?
Last edited by Steve Coalbran on Tue May 08, 2018 7:43 pm, edited 2 times in total.
Steve
User avatar
Steve Coalbran
 
Posts: 114
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 8 times
Been thanked: 1 time

Re: IEBUPDTE to update 1st record in a JOB library

Postby Steve Coalbran » Tue May 08, 2018 7:41 pm

steve-myers wrote:...I use IEBUPDTE quite a lot...
Thanks Steve,
I don't really follow this example. It looks terribly complicated to just change the first record of a member which is all I need.
I am already thinking I can copy the whole member much more easily using IEBCOPY?
Steve
User avatar
Steve Coalbran
 
Posts: 114
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 8 times
Been thanked: 1 time

Re: IEBUPDTE to update 1st record in a JOB library

Postby steve-myers » Tue May 08, 2018 7:43 pm

My little example was to do the ./ NUMBER as you tried without any risk of damaging my real library. I think you are right to number the member, otherwise you can't update just the first record. I said my example was rather too complicated up front, but it was complicated for two reasons.
  1. I did not want to risk damaging the "production" library, which has dozens of members of varying size that I don't want to lose. The I/O error you got rather frightened me.
  2. It allowed me to run TRACKSUM with a reasonable chance of analyzing the output. While I did not show intermediate runs I detected a run without UPDATE=INPLACE which might have embarrassed me had I posted it.
The member I numbered was just a small member I had no good reason to update. In fact, I'm not sure why it was saved in the first place!
steve-myers
Global moderator
 
Posts: 1916
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 206 times

Re: IEBUPDTE to update 1st record in a JOB library

Postby Steve Coalbran » Tue May 08, 2018 7:46 pm

steve-myers wrote:My little example was to do the
I think you went SD37 there Steve?
Steve
User avatar
Steve Coalbran
 
Posts: 114
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 8 times
Been thanked: 1 time

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post