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

How to pass DCB parameters from an input DSN to output DSN


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jimmybhandari

New User


Joined: 04 Jun 2009
Posts: 13
Location: bangalore

PostPosted: Fri Jun 26, 2009 7:53 pm
Reply with quote

Is it possible to create an output dsn with the same dcb parameters as the input dsn, just like what happens in DMSsort.

I tried using the following but, some how this is not working out.
//Indsn dd dsn=input,DCB=(LRECL=560,BLKSIZE=0,RECFM=FB)....
//outdsn dd dsn=ouput,dcb=*.indsn,.......

Please let me know if there is a problem in above method or an alternative solution to above problem.

Thanks
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Jun 26, 2009 7:56 pm
Reply with quote

Yeah, use DFSORT or SYNCSORT.
Back to top
View user's profile Send private message
jimmybhandari

New User


Joined: 04 Jun 2009
Posts: 13
Location: bangalore

PostPosted: Fri Jun 26, 2009 8:33 pm
Reply with quote

superk wrote:
Yeah, use DFSORT or SYNCSORT.


Thanks for replying Kevin. But, i want to do this task without using sort as, i am not calling DFSORT or SYNCSORT in my PROC.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Jun 26, 2009 8:35 pm
Reply with quote

jimmybhandari wrote:
Is it possible to create an output dsn with the same dcb parameters as the input dsn, just like what happens in DMSsort.

I tried using the following but, some how this is not working out.
//Indsn dd dsn=input,DCB=(LRECL=560,BLKSIZE=0,RECFM=FB)....
//outdsn dd dsn=ouput,dcb=*.indsn,.......

Please let me know if there is a problem in above method or an alternative solution to above problem.

Thanks


The referback you show in your jcl does what you want.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Fri Jun 26, 2009 8:59 pm
Reply with quote

PS. I believe, using refer-back is not a good idea if the "indsn" and "outdsn" are not on similar storage device. Though I'm little skeptical about what if both are on tape? (it's around 9 PM in office, don't want experiment just now...)
Back to top
View user's profile Send private message
jimmybhandari

New User


Joined: 04 Jun 2009
Posts: 13
Location: bangalore

PostPosted: Fri Jun 26, 2009 9:22 pm
Reply with quote

Anuj Dhawan wrote:
PS. I believe, using refer-back is not a good idea if the "indsn" and "outdsn" are not on similar storage device. Though I'm little skeptical about what if both are on tape? (it's around 9 PM in office, don't want experiment just now...)


What i specified in the jcl above seems to the correct solution but, i am getting abend for the time being.

SYSTEM COMPLETION CODE=013 REASON CODE=00000034

Though i havent checked with dissimilar storage devices till now.

Thanks everyone for your help.. ...
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Fri Jun 26, 2009 9:41 pm
Reply with quote

That was just a precautionary measure, that's why written in Post Script... icon_smile.gif
Quote:
SYSTEM COMPLETION CODE=013 REASON CODE=00000034
If you are changing the length of the record in any way, shortening or extending the line length, or writing out a different format, i.e. from FB to VB, or VB to FB, then you can not use the same attributes for the output file as the input file.

So, what is your PROC (program of that step in which you get abend) doing?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Fri Jun 26, 2009 10:49 pm
Reply with quote

The more information you provide the earlier you can get solutions. An 013-34 has these meanings in the manual:
Quote:
34
The system detected one of these conditions:

* The following combination was specified: QSAM, MACRF=GD or PD, and a RECFM value that is not VS, VBS, DS, or DBS.

* An OPEN macro instruction was issued for a data set with BLKSIZE and BUFL equal to 0. The system determined that it had to obtain buffers but was unable to do so.

* RECFM was specified with both the A and M attributes.

* The following combination was specified: QSAM, LRECL=0, and a RECFM value that is not V or VB.

* The following combination was specified: RECFM=V or VB and LRECL greater than the quantity BLKSIZE minus 4.

* The following combination was specified: QSAM and BLKSIZE=0. No nonzero BLKSIZE value was available from any source and the system could not determine one. Coding BLKSIZE=0 in the JCL never has an effect except when overriding a cataloged procedure variable.

* The following combination was specified: RECFM not variable or undefined and LRECL greater than BLKSIZE.

* The following combination was specified: BFTEK=A, RECFM=VBS, and LRECL=0.
Back to top
View user's profile Send private message
jimmybhandari

New User


Joined: 04 Jun 2009
Posts: 13
Location: bangalore

PostPosted: Fri Jun 26, 2009 11:47 pm
Reply with quote

Robert Sample wrote:
The more information you provide the earlier you can get solutions. An 013-34 has these meanings in the manual:
Quote:
34
The system detected one of these conditions:

* The following combination was specified: QSAM, MACRF=GD or PD, and a RECFM value that is not VS, VBS, DS, or DBS.

* An OPEN macro instruction was issued for a data set with BLKSIZE and BUFL equal to 0. The system determined that it had to obtain buffers but was unable to do so.

* RECFM was specified with both the A and M attributes.

* The following combination was specified: QSAM, LRECL=0, and a RECFM value that is not V or VB.

* The following combination was specified: RECFM=V or VB and LRECL greater than the quantity BLKSIZE minus 4.

* The following combination was specified: QSAM and BLKSIZE=0. No nonzero BLKSIZE value was available from any source and the system could not determine one. Coding BLKSIZE=0 in the JCL never has an effect except when overriding a cataloged procedure variable.

* The following combination was specified: RECFM not variable or undefined and LRECL greater than BLKSIZE.

* The following combination was specified: BFTEK=A, RECFM=VBS, and LRECL=0.


Thanks Rob,

I am trying to implement this in an instream EZTtieve code.
Reading and writing the files as below

FILE INFILE FB (0 0)
........

FILE OUTFILE FB (0 0)
........

SO, THIS SHOULD PICKUP THE LRECL FROM JCL ITSELF AND TAKE BLOCKSIZE SET BY SMS AND THE BLOCKSIZE MAY WELL BE THE REASON FOR THIS ABEND AS, THE INPUT DSN MAY NOT BE SMS MANAGED.

I AM NOT SURE HOW I CAN COPY BLOCKSIZE ALSO FROM JCL IN AN EASYTRIEVE CODE.

pPLEASE SEE IF YOU CAN HELP.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Fri Jun 26, 2009 11:56 pm
Reply with quote

Have you ever done this successfully? The JCL Language Reference manual says
Quote:
12.16.3 Completing the Data Control Block


The system obtains data control block information from the following sources, in override order:

* The processing program, that is, the DCB macro instruction in assembler language programs or file definition statements or language-defined defaults in programs in other languages.

* The DCB subparameter of the DD statement.

* The data set label.

Therefore, if you supply information for the same DCB field in your processing program and on a DD statement, the system ignores the DD DCB subparameter. If a DD statement and the data set label supply information for the same DCB field, the system ignores the data set label information.
So by specifying the DCB in your program, you are explicitly telling the system not to use the JCL or the file as DCB source. I suspect setting the LRECL to 0 in your code is not a wise thing to do.
Back to top
View user's profile Send private message
jimmybhandari

New User


Joined: 04 Jun 2009
Posts: 13
Location: bangalore

PostPosted: Sat Jun 27, 2009 12:07 am
Reply with quote

Robert Sample wrote:
Have you ever done this successfully? The JCL Language Reference manual says
Quote:
12.16.3 Completing the Data Control Block


The system obtains data control block information from the following sources, in override order:

* The processing program, that is, the DCB macro instruction in assembler language programs or file definition statements or language-defined defaults in programs in other languages.

* The DCB subparameter of the DD statement.

* The data set label.

Therefore, if you supply information for the same DCB field in your processing program and on a DD statement, the system ignores the DD DCB subparameter. If a DD statement and the data set label supply information for the same DCB field, the system ignores the data set label information.
So by specifying the DCB in your program, you are explicitly telling the system not to use the JCL or the file as DCB source. I suspect setting the LRECL to 0 in your code is not a wise thing to do.


Rob,

Specifying file filname FB (0 0)
is not setting lelrecl to 0 but, is refering the program to take the same from JCL parameters.

I also tried giving just
File filename.

That too is giving same abend.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sat Jun 27, 2009 12:49 am
Reply with quote

Hello,

Can you read the input file successfully in Easytrieve?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Sat Jun 27, 2009 1:19 am
Reply with quote

I (obviously) don't know Easytrieve, so I don't think I'll be much help. The referback as you originally presented will work and copy the DCB attributes from the input file to the output file -- as long as they are in the sequence you showed. Your problem therefore becomes application related since the JCL will do what you want.

You probably need to post the full JCL and program (unless they're ridiculously long).
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Sat Jun 27, 2009 2:04 am
Reply with quote

For my easytrieve files I leave the "FB (0 0)" off both the input and output files. I guess I had not tried using a refer back to the input because I am now getting the same result without the "FB (0 0)" that you are getting with it, If I do not put the DCB of the input file in my JCL (letting the system get it off of the file), which is my normal practice. But if I put the DCB in the JCL on the input file and the refer back on the output file it is working.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Sat Jun 27, 2009 2:20 am
Reply with quote

Upon farther testing without the "FB (0 0)" gives blksize=lrecl. (I thought I had found that not to be true in the past). So I will now just leave it off of the input not the output file.

Also only the LRECL is needed in the JCL on the input with the refer back on the output. Or no DCB on the input and just the LRECL on the output.

Strange, this is not what I would have expected.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Sat Jun 27, 2009 8:25 pm
Reply with quote

Have a look on this very similar earlier thread, that does not provide a solution but yes, tells the same that there is something to do with your program-logic. For an experiment, please try coding DCB=LRECL=?? for your output DSN and let us know if that works.
Back to top
View user's profile Send private message
jimmybhandari

New User


Joined: 04 Jun 2009
Posts: 13
Location: bangalore

PostPosted: Mon Jun 29, 2009 6:05 pm
Reply with quote

Anuj Dhawan wrote:
Have a look on this very similar earlier thread, that does not provide a solution but yes, tells the same that there is something to do with your program-logic. For an experiment, please try coding DCB=LRECL=?? for your output DSN and let us know if that works.


The logic DCB=LRECL= is not working out Anuj. This gives the below error
---CAY6049E BACK REFERENCE NOT VALID FOR "LRECL" PARAMETER OF "DCB"---

Douglous, i went through your posts... yes, this is strange that we need to specify DCB at least for one of Input/ output files to make back reference work with EZT. But, then i dont think this would be really useful as, i want to reduce the user inputs for my PROC. As, this is not working out, i will get the input file's DCB parameters as input from user and put the same for output.

The logic i have coded is not making any changes to blksize, lrecl's etc. Its a big code so, cant paste it here.

But, i think the abend is not because of the logic in the EZT coding but, may be while reading from the input file or writing to output file, EZT changes these parameters.

For now, i will manually control this thing........if i do find any solution, will update here...

Thanks Everybody for your help
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Mon Jun 29, 2009 6:52 pm
Reply with quote

Quote:
i will get the input file's DCB parameters as input from user
What does this mean? icon_confused.gif . File is on Mainframes, so DCBs are with you... icon_confused.gif
Back to top
View user's profile Send private message
CaptBill

New User


Joined: 28 May 2009
Posts: 20
Location: Oklahoma City, OK USA

PostPosted: Tue Jun 30, 2009 3:09 am
Reply with quote

I believe the best solution to your problem is to try what you had in your question. If that does not work, then post the results and ask a question.
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts COBOL sorting, with input GDG base COBOL Programming 7
No new posts Is this possible via sort (in one pass)? SYNCSORT 4
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts Starting a PROC with parameters from ... CLIST & REXX 6
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
Search our Forums:

Back to Top