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

IEBPTPCH for many PS


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

New User


Joined: 18 Sep 2024
Posts: 5
Location: United States

PostPosted: Fri Nov 08, 2024 4:06 am
Reply with quote

I am looking for way to combine many flat files into single file with the dataset name name header (just like IEBPTPCH does for a library but instead for I would provide a list of file names like).

Something like:

Code:
//IEBPTPCH EXEC PGM=IEBPTPCH                                     
//SYSUT2    DD DISP=(,CATLG,DELETE),UNIT=SYSDA,                 
//             SPACE=(CYL,(900,55)),DSN=COMB.FLAT.FILE,
//             DCB=(RECFM=FB,LRECL=95,BLKSIZE=0)                 
//SYSPRINT DD SYSOUT=*                                           
//SYSIN      DD *                                               
 PUNCH TYPORG=PO                                                 
  DSN=FB94.RAW.D1022.T1230
  DSN=FB94.RAW.D1022.T1252
  DSN=FB94.RAW.D1022.T1302
  DSN=FB94.RAW.D1022.T1303   



Would produce file looking like:

Code:
DSN:  FB94.RAW.D1022.T1230
.... <file content>
DSN:  FB94.RAW.D1022.T1252
.... <file content>
DSN:  FB94.RAW.D1022.T1302
.... <file content>
DSN:  FB94.RAW.D1022.T1303
.... <file content>



This will be used to
1) speed up transfer time (download 1 big file, instead of many small files)
2) help search many small files at one
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Fri Nov 08, 2024 10:47 am
Reply with quote

Use an INSTREAM PROC like the shown one.
Code:
//IEBPTPCH PROC DSN=NULLFILE                         
//COPY     EXEC PGM=SORT,PARM='MSG=NO,JP0"&DSN"'     
//SORTIN   DD DISP=SHR,DSN=&DSN                     
//SYSOUT   DD SYSOUT=*                               
//SORTOUT  DD DSN=<big_dsn>,                               
//            DISP=(MOD,CATLG,DELETE),UNIT=SYSALLDA,
//            SPACE=(CYL,(2,1),RLSE),               
//            DSORG=PS,BLKSIZE=0                     
//SYSIN    DD *                                     
  OPTION COPY                                       
  OUTFIL HEADER1=(C'DSN:',2X,JP0)                   
  END                                               
/*                                                   
//         PEND                                     
//*                                                 
//         EXEC IEBPTPCH,DSN=FB94.RAW.D1022.T1230   
//         EXEC IEBPTPCH,DSN=FB94.RAW.D1022.T1252   
//         EXEC IEBPTPCH,DSN=FB94.RAW.D1022.T1302
Back to top
View user's profile Send private message
NathanReese

New User


Joined: 18 Sep 2024
Posts: 5
Location: United States

PostPosted: Fri Nov 08, 2024 8:34 pm
Reply with quote

Excellent - that works great!

Now only have to figure way to get around 256 step limit... (have ~1700+ dsn to combine). I think I'll just have to break this up into multiple jobs and run them sequentially.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 734
Location: Denmark

PostPosted: Sat Nov 09, 2024 12:16 am
Reply with quote

Or run them in a REXX or some such, using dynalloc for allocation of datasets.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1050
Location: Richmond, Virginia

PostPosted: Sat Nov 09, 2024 8:03 am
Reply with quote

I am a little bothered by naming the PROC the same as the utility program.

Sure, it works, but I can see a beginner being confused.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Sat Nov 09, 2024 11:48 am
Reply with quote

Phrzby Phil wrote:
I am a little bothered by naming the PROC the same as the utility program.

Sure, it works, but I can see a beginner being confused.

Indeed, it could be confusing for some. icon_confused.gif
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 734
Location: Denmark

PostPosted: Sat Nov 09, 2024 3:16 pm
Reply with quote

You can call the proc whatever you like, as long as the name is valid. You could just call it A.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Sat Nov 09, 2024 4:45 pm
Reply with quote

Quote:
You can call the proc whatever you like, as long as the name is valid. You could just call it A.


and... if you want people think that you are using Object Oriented jcl you might call it SELF
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 IEBPTPCH limitations JCL & VSAM 8
No new posts IEBPTPCH PDS to PS. JCL & VSAM 4
No new posts IEBPTPCH utility to copy members from... All Other Mainframe Topics 3
No new posts Run IEBPTPCH with several PDS in SYSUT1 JCL & VSAM 13
No new posts sample JCL for IEBPTPCH Utility JCL & VSAM 1
Search our Forums:

Back to Top