IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

AFRREBLK - Dynamic DSN


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
XofPlata

New User


Joined: 06 Oct 2020
Posts: 4
Location: France

PostPosted: Tue Oct 06, 2020 1:19 pm
Reply with quote

Hi !

I am using since several years AFRREBLK in the 6 Panel in comand line but I'd rather to batch it in a JCL because we will soon receive many files that will need to be reblocked.

So, I'm facing 1 issue:
I'm not able to put the DSN in parameters in the AFRREBLK command.

Please find in attachment the JCL i'm currently using.

&INDSN and &OUTDSN work in the allocation on the DD cards but don't work in the AFRREBLK command in the SYSIN.

So, I have to put the full DSNs in the AFRREBLK command, which is useless...

Could you please help me ?

Best regards

XofPlata
Back to top
View user's profile Send private message
XofPlata

New User


Joined: 06 Oct 2020
Posts: 4
Location: France

PostPosted: Tue Oct 06, 2020 1:56 pm
Reply with quote

Maybe I should have posted it in the "JCL forum" ? If so, please the moderateur feel free to move this post where it should have been posted ...

Thx

XofPlata wrote:
Hi !

I am using since several years AFRREBLK in the 6 Panel in comand line but I'd rather to batch it in a JCL because we will soon receive many files that will need to be reblocked.

So, I'm facing 1 issue:
I'm not able to put the DSN in parameters in the AFRREBLK command.

Please find in attachment the JCL i'm currently using.

&INDSN and &OUTDSN work in the allocation on the DD cards but don't work in the AFRREBLK command in the SYSIN.

So, I have to put the full DSNs in the AFRREBLK command, which is useless...

Could you please help me ?

Best regards

XofPlata
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Oct 06, 2020 3:13 pm
Reply with quote

Do not post attachments. Cut and paste is simpler and more secure. Many people do not or cannot download attachments. Make sure, if posting screenshots, code, data or anything else requiring a fixed pitch font that you enclose the information within the code tags.
Please repost your attachment as a cut and paste.
Back to top
View user's profile Send private message
XofPlata

New User


Joined: 06 Oct 2020
Posts: 4
Location: France

PostPosted: Tue Oct 06, 2020 3:30 pm
Reply with quote

Hi Nic,

ok, no problem.

Please find below the code of my JCL

Code:

//A4542220 JOB (TNB8278X,MVS),'AFRREBLK',CLASS=S,MSGCLASS=U,       
//   MSGLEVEL=(1,1),NOTIFY=&SYSUID                                 
/*JOBPARM S=*                                                       
// SET INDSN=RECEPTOM.KTCS0001.S1.HSGIF.D240920                     
// SET OUTDSN=CAP1.A454222.KTCS.RBLK                               
/*ROUTE PRINT N25                                                   
//***************************************************************   
//* EXECUTE THE AFP REBLOCK COMMAND                                 
//***************************************************************   
//STEP01 EXEC PGM=IKJEFT1A,REGION=0M                               
//SYSEXEC DD DISP=SHR,DSN=SYS1.SAPSEXEC                             
//INDSN   DD DISP=SHR,                                             
// DSN=&INDSN                                                       
//*DSN=RECEPTOM.KTCS0001.S1.HSGIF.D240920                           
//OUTDSN   DD DISP=(MOD,CATLG,DELETE),                             
// DCB=(RECFM=VB,LRECL=8205,BLKSIZE=8209),                         
// SPACE=(CYL,(5,1)),DSORG=PS,MGMTCLAS=MA0030,                     
// DSN=&OUTDSN                                                     
//*DSN=CAP1.A454222.KTCS.RBLK                                       
//SYSTSPRT DD SYSOUT=*                                             
//SYSTSIN DD *                                                     
AFRREBLK 'RECEPTOM.KTCS0001.S1.HSGIF.D240920' -                   
          CAP1.A454222.KTCS.RBLK'                                 
//*AFRREBLK '&INDSN' -                                             
//*          &OUTDSN'                                             
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2012
Location: USA

PostPosted: Tue Oct 06, 2020 7:22 pm
Reply with quote

RTFM:
EXPORT SYMLIST=
Back to top
View user's profile Send private message
XofPlata

New User


Joined: 06 Oct 2020
Posts: 4
Location: France

PostPosted: Tue Oct 06, 2020 8:03 pm
Reply with quote

Hi

First of all, thank you for your reply and the link to the documentation of EXPORT SYMPLIST.

I tried several of their samples and none are working.

The substitution in the DD cards for INDSN and OUTDSN are good, as you can see below

Code:

//INDSN   DD DISP=SHR,                                                  00010099                             
// DSN=&INDSN                                                           00020099                             
//*DSN=RECEPTOM.KTCS0001.S1.HSGIF.D240920                               00021099                             
IEFC653I SUBSTITUTION JCL - DISP=SHR,DSN=RECEPTOM.KTCS0001.S1.HSGIF.D240920                                   
//OUTDSN   DD DISP=(MOD,CATLG,DELETE),                                  00030099                             
// DCB=(RECFM=VB,LRECL=8205,BLKSIZE=8209),                              00050099                             
// SPACE=(CYL,(5,1)),DSORG=PS,MGMTCLAS=MA0030,                          00060099                             
// DSN=&OUTDSN                                                          00070099                             
//*DSN=CAP1.A454222.KTCS.RBLK                                           00071099                             
IEFC653I SUBSTITUTION JCL - DISP=(MOD,CATLG,DELETE),DCB=(RECFM=VB,LRECL=8205,BLKSIZE=8209),SPACE=(CYL,(5,1)),
DSORG=PS,MGMTCLAS=MA0030,DSN=CAP1.A454222.KTCS.RBLK                                                           
//SYSTSPRT DD SYSOUT=*                                                  00080099                             
//SYSTSIN DD *                                                          00090099                             
//*REBLK 'RECEPTOM.KTCS0001.S1.HSGIF.D240920' -                         00102099                             
//*       CAP1.A454222.KTCS.RBLK'                                       00103099                             
//*  CAP1.A454222.KTCS.RBLK'                                            00110099                             


but still I have the issue

Code:

READY                                               
AFRREBLK '&INDSN'          &OUTDSN'                 
                                                     
AFRR000I                                             
AFRR018E Error opening input file. RC = 16           
AFRR001I ---> &INDSN                                 
AFRR000I                                             
AFRR100I RC = 8                                     




I have the same issue whatever the syntax of the AFRREBLK :
- on 1 line with the quotes around &INDSN and &OUTDSN
- on 1 line without the quotes
- on 2 lines with or withour the quotes (but with the "-" at the end of the first line, of course)
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2012
Location: USA

PostPosted: Tue Oct 06, 2020 8:24 pm
Reply with quote

OMG...

Where are your examples: ‘none are working’???

Code:
// EXPORT SYMLIST=*
// SET INDSN=AAAA.BBBB.CCCC.DDDD
// SET OUTDSN=XXXX.YYYY.ZZZZ
. . . . . . . . . .
//SYSTSIN DD *,SYMBOLS=JCLONLY
AFRREBLK ‘&INDSN’   ‘&OUTDSN’
//*
icon_pray.gif
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Wed Oct 07, 2020 11:38 am
Reply with quote

The funny thing is, that one has to define declarations before exporting them. Other than that, job class needs to have SYSSYM=ALLOW.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Wed Oct 07, 2020 1:55 pm
Reply with quote

You are missing a quote in front of the datasetname on the 2nd line.

AFRREBLK 'RECEPTOM.KTCS0001.S1.HSGIF.D240920' -
CAP1.A454222.KTCS.RBLK'

Why do you have a DD statement for your input dataset? Jobfail if it isnt there?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2012
Location: USA

PostPosted: Wed Oct 07, 2020 5:42 pm
Reply with quote

Willy Jensen wrote:
You are missing a quote in front of the datasetname on the 2nd line.

AFRREBLK 'RECEPTOM.KTCS0001.S1.HSGIF.D240920' -
CAP1.A454222.KTCS.RBLK'

Why do you have a DD statement for your input dataset? Jobfail if it isnt there?


Good questions, but both are of the second priority.

First of all, the TS is not able to substitute SET variables into the input stream data, as per his utility log: it gives him RC=8
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts JCL Dynamic System Symbols JCL & VSAM 3
No new posts Synctool-dynamic split job for varyin... JCL & VSAM 7
No new posts Dynamic file allocation using JCL JCL & VSAM 8
No new posts Dynamic Sortin DD cards SYNCSORT 8
Search our Forums:

Back to Top