|
View previous topic :: View next topic
|
| Author |
Message |
XofPlata
New User
Joined: 06 Oct 2020 Posts: 4 Location: France
|
|
|
|
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 |
|
 |
XofPlata
New User
Joined: 06 Oct 2020 Posts: 4 Location: France
|
|
|
|
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 |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
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 |
|
 |
XofPlata
New User
Joined: 06 Oct 2020 Posts: 4 Location: France
|
|
|
|
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 |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2264 Location: USA
|
|
| Back to top |
|
 |
XofPlata
New User
Joined: 06 Oct 2020 Posts: 4 Location: France
|
|
|
|
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 |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2264 Location: USA
|
|
|
|
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’
//* |
 |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1429 Location: Bamberg, Germany
|
|
|
|
| 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 |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 772 Location: Denmark
|
|
|
|
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 |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2264 Location: USA
|
|
|
|
| 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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|