|
View previous topic :: View next topic
|
| Author |
Message |
sushanth bobby
Senior Member

Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi,
I want to write the content of all the PDS members to a PS file. I used this JCL. It works
| Code: |
//HXSULLXX JOB (T,TEST),'PDS 2 PS',MSGCLASS=X,CLASS=L,NOTIFY=&SYSUID
//IEBPTPCH EXEC PGM=IEBPTPCH
//SYSUT1 DD DSN=HXABA.DA.UT,DISP=SHR
//SYSUT2 DD DSN=HXABAL.DA.L,DISP=(,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(TRK,(10,5),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PUNCH TYPORG=PO
/* |
Output:
| Code: |
V//SYSREC00 DD DSN=HXSULL.QUERYRES,DISP=(NEW,KEEP,DELETE),
V// UNIT=SYSDA,
V// SPACE=(TRK,(5,5),RLSE)
V//SYSPUNCH DD SYSOUT=*
V//SYSOUT DD SYSOUT=*
V//SYSIN DD *
V SELECT * FROM INEDATAT.INET_CASE FETCH FIRST 10 ROWS ONLY
V ;
V/* |
Letter 'V' is suffixed in each line. How to avoid it.
I ran the same job to see the result in the spool, letter 'V' didn't appear.
I did XDC in the spool to save the dataset. In the DATASET, the letter 'V' is suffixed. How can i avoid it. |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
| The letter V is the carriage control as IEBPTPCH usually outputs to the spool |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
| You can't. Run that output through a SORT step and remove the first column from the data. |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10899 Location: italy
|
|
|
|
| try to specify the dcb attributes in the output dataset ( fb,lrecl=80) |
|
| Back to top |
|
 |
sushanth bobby
Senior Member

Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Enrico,
This is the attribute i added,
| Code: |
| // DCB=(RECFM=FB,LRECL=80) |
This is the output. A blank line is getting inserted after each line.
| Code: |
V
V//SYSPUNCH DD SYSOUT=*
V
V//SYSOUT DD SYSOUT=*
V
V//SYSIN DD *
V
V SELECT * FROM INEDATAT.INET_CASE FETCH FIRST 10 ROWS ONL
V
V ; |
Thanks
Sushanth |
|
| Back to top |
|
 |
sushanth bobby
Senior Member

Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Superk,
How to eliminate that first column using SORT
Sushanth |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10899 Location: italy
|
|
| Back to top |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
|
|
| you can always use ISPF menu option 3.3. |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10899 Location: italy
|
|
|
|
| Quote: |
| you can always use ISPF menu option 3.3. |
just tested,
it has to decided wether is worse .....
to have a control char as the first byte ( that can be stripped afterwards)
or have all the members junked together without a separator
 |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
| Code: |
//STEPXXXX EXEC PGM=SORT
//SORTIN DD DSN=HXABAL.DA.L,DISP=SHR
//SORTOUT DD DSN=HXABAL.DA.L.SORT,DISP=(,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(TRK,(10,5),RLSE),RECFM=FB
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1:2,80)
/*
|
|
|
| Back to top |
|
 |
sushanth bobby
Senior Member

Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Thank You Super K,
It works. I had to make few changes. Because a error came saying out of range
| Code: |
SYSIN :
OPTION COPY
OUTREC FIELDS=(1:2,80)
WER276B SYSDIAG= 0, 20482, 20482, 1331037
WER164B 8,944K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 3,052K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FBA ; LRECL= 80; BLKSIZE= 80
WER230A OUTREC FIELD OUTSIDE RANGE
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
Changes i made are, i included the SORTLIB and
| Code: |
| OUTREC FIELDS=(1:2,79) |
Thank You,
Sushanth |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
| Interesting. My SORTIN record length (the output from IEBPTPCH) was 81, not 80. |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Kevin: the default IEBPTPCH output is 121 or 81 characters. When Bobby specified LRECL=80,RECFM=FB the output was changed to FBA and since 80 is too small, this quote from the Utilities manual applied:
| Quote: |
| If the logical record length of the input records is such that the output would exceed the output record length, IEBPTPCH divides the record into multiple lines or cards in the case of standard printed output, standard punched output, or when the PREFORM parameter is specified. |
which is why the blank lines showed up in his output. |
|
| Back to top |
|
 |
|
|