Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Nov 03, 2008 6:16 pm    Post subject: Write the content of all the PDS members to a PS file
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: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 03, 2008 6:23 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Mon Nov 03, 2008 6:24 pm    Post subject: Reply to: PDS to PS issue
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Mon Nov 03, 2008 6:29 pm    Post subject: Reply to: PDS to PS issue
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: 1013
Location: India

PostPosted: Mon Nov 03, 2008 6:36 pm    Post subject:
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: 1013
Location: India

PostPosted: Mon Nov 03, 2008 6:44 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Mon Nov 03, 2008 6:44 pm    Post subject: Reply to: PDS to PS issue
Reply with quote

my fault, I had forgotten that ...
http://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    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Mon Nov 03, 2008 7:07 pm    Post subject: Reply to: PDS to PS issue
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

Moderator Team Head


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

PostPosted: Mon Nov 03, 2008 7:10 pm    Post subject: Reply to: PDS to PS issue
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: 1013
Location: India

PostPosted: Mon Nov 03, 2008 7:27 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Mon Nov 03, 2008 7:33 pm    Post subject: Reply to: PDS to PS issue
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: 7931
Location: Bellevue, IA

PostPosted: Mon Nov 03, 2008 7:51 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us