Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
AFRREBLK - Dynamic DSN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
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    Post subject: AFRREBLK - Dynamic DSN
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    Post subject: Re: AFRREBLK - Dynamic DSN
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: 2422
Location: Hampshire, UK

PostPosted: Tue Oct 06, 2020 3:13 pm    Post subject: Reply to: AFRREBLK - Dynamic DSN
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    Post subject: Reply to: AFRREBLK - Dynamic DSN
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

Active Member


Joined: 29 Apr 2008
Posts: 865
Location: Maryland

PostPosted: Tue Oct 06, 2020 7:22 pm    Post subject:
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    Post subject:
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

Active Member


Joined: 29 Apr 2008
Posts: 865
Location: Maryland

PostPosted: Tue Oct 06, 2020 8:24 pm    Post subject:
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

Active User


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

PostPosted: Wed Oct 07, 2020 11:38 am    Post subject:
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 User


Joined: 01 Sep 2015
Posts: 388
Location: Denmark

PostPosted: Wed Oct 07, 2020 1:55 pm    Post subject:
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

Active Member


Joined: 29 Apr 2008
Posts: 865
Location: Maryland

PostPosted: Wed Oct 07, 2020 5:42 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Group selective VB records - Trailer ... Premnath_TJ DFSORT/ICETOOL 16 Sun Sep 13, 2020 3:38 am
No new posts Dynamic file read via JCL abdulrafi JCL & VSAM 4 Fri Aug 14, 2020 11:51 am
No new posts Dynamic cursor name in Cobol program Jlevine COBOL Programming 1 Fri Feb 14, 2020 2:55 am
No new posts Need information on creating dynamic ... grvdeshmukh0 CLIST & REXX 11 Thu Jan 16, 2020 1:55 pm
No new posts Create Dynamic Sort card with Omit co... balaji81_k DFSORT/ICETOOL 9 Thu Sep 26, 2019 10:06 pm

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us