|
View previous topic :: View next topic
|
| Author |
Message |
Vignesh Sid
New User
Joined: 04 Sep 2017 Posts: 43 Location: India
|
|
|
|
Hi all,
I have an input file of 50 record length and fixed block.
| Code: |
WER405I SORTOF02 : DATA RECORDS OUT 0
WER405I SORTOF03 : DATA RECORDS OUT 0
WER405I SORTOF04 : DATA RECORDS OUT 2
WER405I SORTOF05 : DATA RECORDS OUT 18
|
I need an output file like: rec length 50 and FB
| Code: |
END 0000000000 0000000000 0000000002 0000000018
|
Could anyone help me with a sort card to achieve this?
Thanks! |
|
| Back to top |
|
 |
Vignesh Sid
New User
Joined: 04 Sep 2017 Posts: 43 Location: India
|
|
|
|
Hi all,
I used the following card to get the count:
| Code: |
//SORT1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=XBBNGBB.TEST.COUNT,DISP=SHR
//SORTOUT DD DSN=XBBNGBB.TEST.COUNT1,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// DCB=(RECFM=FBS,LRECL=10,BLKSIZE=0),
// SPACE=(CYL,(500,500),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,INCLUDE=(24,4,CH,EQ,C'DATA'),
BUILD=(1:41,10)
/*
The output is:
0
0
2
18
|
Can anyone tell me how to write this is in a single record as explained above.
And I dont know how the spaces are getting deleted while copying the code...Also suggest me how to paste the mainframe display as such.
Thanks! |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
| Vignesh Sid wrote: |
And I dont know how the spaces are getting deleted while copying the code...Also suggest me how to paste the mainframe display as such.
Thanks! |
Above the box where you type your question, there are a few buttons (B, i, u and so on). "Code" is the button you need: click on Code, paste your screen as text, then click again on Code. Alternatively, select some text then click on Code. All selected text will be within Code tags.
About your other question, here is the beginning of the answer:
| Code: |
//* ******************************************* */
//* LOAD TEMPORARY FILE WITH TEMPORARY DATA */
//* ******************************************* */
//STEP01 EXEC PGM=IEBGENER
//SYSUT1 DD *
WER405I SORTOF02 : DATA RECORDS OUT 0
WER405I SORTOF03 : DATA RECORDS OUT 0
WER405I SORTOF04 : DATA RECORDS OUT 2
WER405I SORTOF05 : DATA RECORDS OUT 18
//SYSUT2 DD DISP=(NEW,PASS,DELETE),DSN=&INP,
// DCB=(RECFM=FB,LRECL=80)
//* ******************************************* */
//* JOIN LINES */
//* ******************************************* */
//STEP02 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//SSMSG DD SYSOUT=*
//INP DD DISP=(OLD,DELETE),DSN=&INP
//OUT DD SYSOUT=*
//TOOLIN DD *
RESIZE FROM(INP) TO(OUT) TOLEN(60) USING(CTL1)
//CTL1CNTL DD *
INREC BUILD=(41,10)
//* ******************************************* */ |
Now,Syncsort did not provide documentation for SYNCTOOL (but it is there and you should try it) but you could google for "ICETOOL DOCUMENTATION" and find something interesting. |
|
| Back to top |
|
 |
Vignesh Sid
New User
Joined: 04 Sep 2017 Posts: 43 Location: India
|
|
|
|
Thanks Marso. It is working and I got the desired output!
| Code: |
//STEP3 EXEC PGM=ICETOOL
//SYSPRINT DD SYSOUT=*
//IN1 DD DISP=SHR,DSN=XBBNGBB.TEST.COUNT1
//OUT1 DD DSN=XBBNGBB.TEST.COUNT2,
// DISP=(OLD,CATLG,DELETE),
// SPACE=(CYL,(5,1),RLSE),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=40,BLKSIZE=0)
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
RESIZE FROM(IN1) TO(OUT1) TOLEN(40)
//* |
This code worked in syncsort! Thanks for explaining the code option [/code] |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|