Guys,
We have a PL/1 program (inherited, one of many) which issues a DISPLAY to put information to the SYSPRINT file.
In the JCL it is pre-allocated first as a PS-FB-121-6050 dataset.
This is then defined in the PL/1 run step and allocated to the SYSPRINT DD statement.
It is NOT DECLAREd in the program itself (this is apparently not a neccessity!)
Running the program appears to change this PS-FB-121-6050 dataset to a PS-VB-1028-6144 dataset.
The DISPLAYed data appears there happily.
However, for logistical reasons I can't go into, this is too large and we really want to use the PS-FB-121 (or thereabouts) pre-allocated values instead.
Does anybody know how to circumvent this, or where the defaults are stored when SYSPRINT is dynamically allocated or used by PL/1?
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
I am no PL/I expert; I can't answer your query directly. I would like to make a couple of observations.
Personally, I do not think the PL/I library should be changing the DCB attributes of the data set specified by the DD statement with DD name SYSPRINT. I think this is an issue you should pursue with IBM. Unfortunately there is no truly "right" answer for this issue so you may find IBM's response less than satisfactory to you. Perhaps true PL/I experts might have more input than I can provide.
I do not think inserting tab characters into a data set will result in the behavior you expect. No IBM printer that I know about provides a tab type function, and the PL/I library does not seem to respond to tab characters by inserting the appropriate blanks into the final output line.
Based on the Language Reference manual, you can achieve a tab like capability by using COLUMNnnn) in PUT EDIT statements. The Language Reference manual also mentions X(nnn) to "place blank characters in line to establish position," though this does not seem to be a tab type function.
It has been my experience that most of the time data sets specified as having variable length records require less space than data sets specified with fixed length records mainly because it is easy to remove trailing blanks in the output line. Roughly 40 years ago I decided to generally prepare data sets with variable length records; other than complaints from people that want to write programs to reprocess print type data sets who are not accustomed to handling VB data sets there have been few problems.
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
steve-myers wrote:
I am no PL/I expert; I can't answer your query directly. I would like to make a couple of observations.
Personally, I do not think the PL/I library should be changing the DCB attributes of the data set specified by the DD statement with DD name SYSPRINT. I think this is an issue you should pursue with IBM. Unfortunately there is no truly "right" answer for this issue so you may find IBM's response less than satisfactory to you. Perhaps true PL/I experts might have more input than I can provide.
It doesn't. There are defaults, and they could be found by RTFM. If they are not coded in the JCL or on the DCL SYSPRINT statement, the only thing that actually changes them from the defaults is the use of a DCL 1 PLITABS EXTERNAL structure.
steve-myers wrote:
I do not think inserting tab characters into a data set will result in the behavior you expect. No IBM printer that I know about provides a tab type function, and the PL/I library does not seem to respond to tab characters by inserting the appropriate blanks into the final output line.
His TAB variable has nothing to do with tab characters. It's an array of BIT(1) variables. Read about the PLITABS structure to set up columnar output data.
And as for your last two answers/observations, they are not really (or really not...) relevant to the question.
And finally, using DISPLAY to put data on SYSPRINT has only been possible since Enterprise PL/I introduced a compiler option to do so. Normally you should use PUT DATA/PUT LIST/PUT EDIT to print data to SYSPRINT. It's not unlikely that the Runtime library routines that translate DISPLAY (which normally goes to the Console) into a format that goes to SYSPRINT do not respect the default DCB. You should enter an RFE on the IBM developerworks site. (All current PL/I RFEs are @ www.ibm.com/developerworks/rfe/execute?use_case=searchRFEs&SAVED_SEARCH_ID=3071 )
This program, unfortunately, is one of a couple of thousand that we inherited to run for another Customer, and so - although we wouldn't advocate doing anything like this in the same way - our hands are a little tied if we don't want to have to change the program and/or JCL for these 2000+ instances?
Agree that TAB is confusing here, and it's really short for TABLE I guess?
Not that "tabbing" in a DISPLAY statement shouldn't work, as it's only laying out the print line ready for display on the output device.
Online docs variously say SYSPRINT defaults to a STREAM PRINT environment but some say 121 bytes, others say VB, and there appears to be no definite statement to tell you just what DCB parameters it assigns it with.
Appreciate you taking the time and trouble to reply, guys.