Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Formatting multiple records to a single record!!

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
Vignesh Sid

New User


Joined: 04 Sep 2017
Posts: 22
Location: India

PostPosted: Tue Nov 07, 2017 12:22 pm    Post subject: Formatting multiple records to a single record!!
Reply with quote

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

Vignesh Sid

New User


Joined: 04 Sep 2017
Posts: 22
Location: India

PostPosted: Tue Nov 07, 2017 12:56 pm    Post subject:
Reply with quote

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

REXX Moderator


Joined: 13 Mar 2006
Posts: 1247
Location: Israel

PostPosted: Tue Nov 07, 2017 4:29 pm    Post subject:
Reply with quote

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

New User


Joined: 04 Sep 2017
Posts: 22
Location: India

PostPosted: Tue Nov 07, 2017 6:03 pm    Post subject:
Reply with quote

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 icon_biggrin.gif[/code]
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts Matching and unmatched records!! Vignesh Sid SYNCSORT 3 Thu Nov 09, 2017 11:22 am
No new posts Updating multiple counts in trailer!! Vignesh Sid SYNCSORT 4 Mon Nov 06, 2017 1:04 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us