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

Write the content of all the PDS members to a PS file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Nov 03, 2008 6:16 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Nov 03, 2008 6:23 pm
Reply with quote

The letter V is the carriage control as IEBPTPCH usually outputs to the spool
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon Nov 03, 2008 6:24 pm
Reply with quote

You can't. Run that output through a SORT step and remove the first column from the data.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Nov 03, 2008 6:29 pm
Reply with quote

try to specify the dcb attributes in the output dataset ( fb,lrecl=80)
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Nov 03, 2008 6:36 pm
Reply with quote

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
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Nov 03, 2008 6:44 pm
Reply with quote

Superk,
How to eliminate that first column using SORT


Sushanth
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Nov 03, 2008 6:44 pm
Reply with quote

my fault, I had forgotten that ...
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2U130/9.6.3.3?SHELF=EZ2ZO10K&DT=20060626223348&CASE=
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Nov 03, 2008 6:56 pm
Reply with quote

you can always use ISPF menu option 3.3.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Nov 03, 2008 7:07 pm
Reply with quote

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

icon_biggrin.gif
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon Nov 03, 2008 7:10 pm
Reply with quote

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
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Nov 03, 2008 7:27 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon Nov 03, 2008 7:33 pm
Reply with quote

Interesting. My SORTIN record length (the output from IEBPTPCH) was 81, not 80.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Mon Nov 03, 2008 7:51 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 2
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top