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 using DFsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Guru Nandu

New User


Joined: 16 Jul 2009
Posts: 6
Location: India

PostPosted: Thu Nov 30, 2017 7:33 am    Post subject: Formatting using DFsort
Reply with quote

Hi,

If input file in variable length record as shown below

12073
12083
1208345
120834

Using DFSORT/ICETOOL, Can we format as sample provided below
AAA
BBB
CCC:YYMMDD001
XXX12073YY
XXX12073YY
XXX1208345YY
XXX120834YY
zzz
ggg04

Line 1: where AAA is a static header 1
Line 2: Where BBB is static header 2
Line 3: where CCC is static and YY is year, MM is month and DD is date and 999 is static number - This is header 3
Line 4:
where XXX is static value.
include the record 12073
YY is picked from that record(12073) 3:2 (07)
All the remaining records in input file will use the above logic stated in Line 4
Line 8: Trailer1 must contain static value zzz
Line 9: Trailer1 must contain static value ggg and 04 is the total count
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1932
Location: UK

PostPosted: Thu Nov 30, 2017 5:50 pm    Post subject:
Reply with quote

Please use the code tags. It is a data set not a 'file'.

I believe that it can be done - what have your tried so far?
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 232
Location: Maryland

PostPosted: Fri Dec 01, 2017 2:26 am    Post subject: Re: Formatting using DFsort
Reply with quote

Guru Nandu wrote:
Hi,



This forum is not supposed for you to place YOUR OWN TASK here, expecting to get the solution of YOUR TASK from others.

This forum is supposed for you to place the results of YOUR OWN ATTEMPT to do your own job - in case the received results are somehow not what is expected.
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 211
Location: Chennai

PostPosted: Sun Dec 03, 2017 1:16 pm    Post subject: Reply to: Formatting using DFsort
Reply with quote

Guru Nandu,

What is the maximum record length of your variable file.

I assumed it as 16 and developed the code UNTESTED, you may need to modify according to your requirements.

Code:

//STEP01  EXEC PGM=SORT                             
//SYMNAMES DD *                                     
HDATE,S'&LYR2.&LMON.&LDAY.'                         
//SORTIN  DD DISP=SHR,DSN=INPUT.FILE             
//SORTOUT DD DISP=(,CATLG,DELETE),                 
//           SPACE=(CYL,(10,10),RLSE),             
//           DSN=OUTPUT.FILE                   
//SYSOUT  DD SYSOUT=*                               
//SYSIN   DD *
  OPTION COPY                                                     
  INREC OVERLAY=(08:5,16,
                 05:C'XXX',
                 21:10,2,
                 05:5,21,SQZ=(SHIFT=LEFT))
 
  OUTFIL HEADER1=(C'AAA',/,
                  C'BBB',/,
                  C'CCC:',HDATE,C'001'),         
         
         TRAILER1=(C'ZZZ',/,
                   C'GGG',
                   COUNT=(EDIT=(TT))),             
         REMOVECC                                                     
                                     
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 232
Location: Maryland

PostPosted: Mon Dec 04, 2017 8:23 pm    Post subject:
Reply with quote

//SYMNAMES DD cannot handle parameters, except exported JCL SET-variables

Without any demonstrated results produced by your own code, either correct or incorrect ones, nobody in this forum is going to do your own job instead of yourself. Period.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1827
Location: NY,USA

PostPosted: Tue Dec 05, 2017 12:31 am    Post subject:
Reply with quote

Similar post(s) are discussed before over internet, why is self research missing here? You wait till someone do the work for you and you just don't learn?
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm

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