We are running CICS/TS 1.3 and the journal utility program (DFHJUP) is being used to offload the journal data. I would like to take that data, which is offloaded to an unblocked dataset, and copy it to a fixed-blocked dataset. When I view the data from ISPF 3.4 the records viewed don't exceed 161 bytes. What is the best way to accomplish this task?
Back in the VERY old days, one used to do all this sort of thing via the IEBGENER utility. However, when I need to alter record length or otherwise do reblocking operations, I use the MVS (or VM) PIPE command. This runs quite happily natively in JCL, or the TSO Environment, and you can very easily plonk this operation inside a Rexx Exec, If you look at one of my SupportPacs (that one to do with EXCI linkage to Batch), you will see an example of how to use Pipes in a complex fashion. Here is some simple JCL which will suit: //RUN EXEC PGM=PIPE, // PARM='(SEP ;) < dd=IN ; chop 200 ; pad 200 ; > dd=OUT' //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //IN DD DSN=&&IN,DISP=SHR //OUT DD DSN=&&OUT,DISP=(NEW,PASS), // UNIT=SYSDA, // SPACE=(CYL,(1,1)), // DCB=(RECFM=FB,LRECL=200,BLKSIZE=200) The reason why you need both the CHOP and the PAD is that this will ensure fixed-length records by truncating longer ones (the CHOP) and extending the shorter ones (PAD). You can put another parm on the PAD to extend with a given character (which can be specified in Hex). You can extend this technique by using other stage commands to do record selection as part of the pipe operation or get into Secondary and Tertiary streams. You may also want to use the SPECS stage command to reformat the records (the example below puts in a prefix for each output stream). In these cases, you will need to construct larger operations by using the RUNPIPE construct (this is taken from the aforementioned SupportPac). The thing to note is the use of the PIPEIN file to contain the full Pipe command to be executed and PIPEOUT to receive the output from the sequence: the JOIN * gets rid of lines from the PIPEIN file so allowing you to code the pipe with meaningful idents which are got rid of on execution (there are various size limitations around). For info, the RXDPLP stage command is a Rexx Exec, living in the //REXX library : use this functionality to do more complicated things than is permitted (or is easier ) in the Stage processing on a record-by-record basis. //RUN4 EXEC PGM=PIPE, // PARM='(SEP ; end ? ) < dd=PIPEIN ; join * ; // runpipe ; > dd=PIPEPOUT coerce' //REXX DD DSN=RHARRI1.CA1IEXEC,DISP=SHR //STEPLIB DD DSN=UTL.RHARRI1.LOAD,DISP=SHR,DCB=BLKSIZE=32760 // DD DSN=RHARRI1.CA1HLOAD,DISP=SHR // DD DSN=CICS.SDFHEXCI,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //PIPEPOUT DD SYSOUT=*,DCB=(RECFM=F,LRECL=132,BLKSIZE=132) //PIPEOUT DD SYSOUT=*,DCB=(RECFM=F,LRECL=132,BLKSIZE=132) //SYSTSPRX DD SYSOUT=* //SYSTSPRT DD SYSOUT=*,DCB=(RECFM=F,LRECL=132,BLKSIZE=132) //PIPEIN DD * (SEP ; end ?) literal cemt i task ; literal RAH Rules ; ss: RXDPLP (W2) (C1) * * / notrace retain abend/; specs /1->/ 1 1-* next ; > dd=PIPEOUT coerce literal utprogb iyckrah6 word3 word4 word5 ; ss: ; specs /2->/ 1 1-* next ; > dd=PIPEOUT coerce ss: ; specs /3->/ 1 1-* next ; > dd=PIPEOUT coerce /*
Related Q&A from Robert Crawford
With 3270 bridge, you can't stack input messages into one structure. The bridge can't process them all at once. It takes a little more work.continue reading
CICS expert Robert Crawford offers advice on determining the connection between CICS transactions and MQ Queue name.continue reading
CICS expert Robert Crawford discusses if a program can use IXLLIST macros in CICS when IXLLIST are APF.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.