Importent note on the output: If the size of the member (lines) is less than the defined PAGELEN (here 26 - most efficient on my site), blank linies are added. However, if the size member is greater than the PAGELEN, the header is repeated on every subsequent page.
My output must be:
Code:
JOBLIB(CHAR(44)) MEMBER(CHAR(8)) JCLLINE1(CHAR(80))
JOBLIB MEMBER JCLLINE2
etc.
Thanks for the suggestion, but... I'd end of with the same problem with members over 999 linies. Plus it'll generate way too much output on top of that.
I'm sure Frank or another SORT-developer can crack this nut... Right, guys?
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
I'm sure Frank or another SORT-developer can crack this nut... Right, guys?
Sorry, but I don't see how this PRINTDS question relates to SORT (I don't use PRINTDS so I'm not familiar with it). If you want me to help, you need to put this in DFSORT terms (example of input and expected output, "rules" for getting from input to output, LRECL and RECFM of input, etc).
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
Claes Norreen,
It looks like you want to concatenate the dataset name and member name from the initial heading with the data line while ignoring any additional page headings.
But, if the additional page headings look like the initial heading, why should you bother to ignore them?
Sorry, but I don't see how this PRINTDS question relates to SORT
Well, no matter where the input comes from, it's still a question of input and output... I merely wrote "PRINTDS" in case you were familiar with the product.
In this particular case, PRINTDS dumps the content of a PDS into a flat dataset in the way I described: For each member, it writes a header (as shown), and the contents of that member follows. If the content of the member is shorter than the PAGELEN defined (here 26), it pads with blank lines to the PAGELEN. If the content of the member is longer than the PAGELEN, then the header is written again on each subsequent page.
I need a dataset with the name of the PDS, the name of the member along with the content for each member as output.
The "DATA SET:" identifier starts in column 2, and the "MEMBER:" identifier starts in column 58. The contents ifself starts in column 1 and is 100 bytes long.
Claes Norreen,
It looks like you want to concatenate the dataset name and member name from the initial heading with the data line while ignoring any additional page headings.
But, if the additional page headings look like the initial heading, why should you bother to ignore them?
So the "rules" are: Grap the Dataset Name and the Member Name from the headers, and write it in front of every line of the contents of that particular Member.
Where Dataset Name is 44 chars wide, Member Name is 8 char, and the content the original 100 bytes.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello Claes,
It may help if you post a more complete example of your output data.
Quote:
So the "rules" are: Grap the Dataset Name and the Member Name from the headers, and write it in front of every line of the contents of that particular Member.
Where Dataset Name is 44 chars wide, Member Name is 8 char, and the content the original 100 bytes.
The input is RECFM=FB, LRECL=100
It looks like the output would be at least 152? I may be missing someting. . .
Quote:
My output must be:
Code:
JOBLIB(CHAR(44)) MEMBER(CHAR(8)) JCLLINE1(CHAR(80))
JOBLIB MEMBER JCLLINE2
etc.
Yes, you are missing that "the content" is not the record in whole, but "the content" from the members involved...
Maybe I didn't explain it well enough, so here's the output from the example I show in my very first post (I use SYS2.JOBLIB as the name of the PDS or joblib-name, and TESTTEST as the member-name):
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
Why was my thread moved? It's a DFSORT question, not a PRINTDS question.
I moved it because I thought it was a PRINTDS question. I just moved it back.
But I still can't relate the output you showed in the previous post to "the example I show in my very first post", or figure out what you mean about the repeated header, so I can't help you. Maybe somebody else can (Kolusu might be able to help, but he's unavailable until the end of the week).
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
Claes,
Please try to isolate an example of the printout (several small members) you expect and then hand craft what you want the final output to be for the input example you provided.
The embedded blank lines in the output should not be there - using the reply/edit i've not been able to remove them. . .
A concern is that when a "member" on the input file has enough lines to exceed a page, the header info is repeated in the "input". I believe that simply skipping the "DATE" lines will eliminate the problem. I suspect that blank lines in the input should also be skipped.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Ok, I think I get it and I was able to create my own output using the PRINTDS utility. I suspect a group and SPLICE operation will give the desired results. It's quitting time here now. I'll see what I can do tomorrow.
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
Frank Yaeger wrote:
I suspect a group and SPLICE operation will give the desired results.
Frank, I know I have seen you provide this kind of solution, but for the life of me, I just couldn't think of how to search for it....
I back-tracked quite a few months back in your forum and nothing 'jumped' out...
For this kind of 'group and SPLICE' solution, what would be a good set of search keywords?
Looking forward to the solution.. By the way, Kolusu solved a similar one for me earlier, search for "LISTDS". I just couldn't adapt it to PRINTDS.
Extract certain output from LISTDS