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
 
Can DFSORT be helpful for this requirement.

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

New User


Joined: 22 Aug 2006
Posts: 95
Location: india

PostPosted: Sat May 02, 2009 4:16 pm    Post subject: Can DFSORT be helpful for this requirement.
Reply with quote

Hi All,

Query :
I have a FB file with lrecl=133 containing around 2778999 records and being written onto tapes (filename = A.B.C).
My requirement is to create a separate descriptor file for A.B.C for an external interface with one record containing following fields :
1) Record count of A.B.C (length 10)
2) Current Date (RNYYMMDD) (length 8) RN is a symbolic parameter(Run number) in the JCL with value 02(may vary)
3) Current time (HH(24):MI:SS) (length 8)
4) RefId : An number incremental of 1 and starts from 1 for the first transmission and increments hencforth. (should be unique) (length 18). Previous descriptor file to be checked for previous RefId and then incrementing it by 1.
5) interface name : 30 characters

Can this be achieved thourgh DFSORT (sort/ICEMAN/ICETOOL).

Sample Record :
0002778999 02090502 16:12:00 000000000000000123 XYZ

Request :
Please have a look. Any help/direction on this would be appreciated.

Thanks.
Abhi
Back to top
View user's profile Send private message

bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 213
Location: Cochin/Kerala/India

PostPosted: Sat May 02, 2009 5:50 pm    Post subject:
Reply with quote

Hi abhishek,
I think you want a header records and trailer record in the output file along with the existing data.
You can add this by HEADER/TRAILER options in he dfsort,
Also you can use the key word 'COUNT' to write the number of records in the output file. &DATE, & TIME will gives you the system date and system time.

Regards,
Bipin Peter
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat May 02, 2009 8:36 pm    Post subject:
Reply with quote

Hello,

Quote:
My requirement is to create a separate descriptor file for A.B.C for an external interface with one record
This does not sound like a header in the same/existing file. . .
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sun May 03, 2009 7:07 am    Post subject:
Reply with quote

Your naming conventions for the nodes of your data set name are not valid. Check the JCL manual.
Back to top
View user's profile Send private message
abhishekmdwivedi

New User


Joined: 22 Aug 2006
Posts: 95
Location: india

PostPosted: Mon May 04, 2009 9:44 am    Post subject: Reply to: Can DFSORT be helpful for this requirement.
Reply with quote

Hi,

Quote:
I think you want a header records and trailer record in the output file along with the existing data.
You can add this by HEADER/TRAILER options in he dfsort,


Sorry but as I have written in the requirement it's not a header/trailer in the same file with all the records. It's separate file altogether with only one record as suggested in the requirement

Quote:
This does not sound like a header in the same/existing file. . .


No. It's not. A separate record in a different file.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon May 04, 2009 11:01 am    Post subject:
Reply with quote

Quote:
Can DFSORT be helpful for this requirement.
Yes, it can be helpful....
Quote:
Sorry but as I have written in the requirement it's not a header/trailer in the same file with all the records. It's separate file altogether with only one record as suggested in the requirement
Sorry, but a lot of the requirement can be done by trailer processing, and to argue this is stupid on your part.
Trailer processing on a dataset can produce a file with a single record.
Quote:
Can this be achieved thourgh DFSORT (sort/ICEMAN/ICETOOL).
Again yes. Have you looked at z/OS V1R10.0 DFSORT: Getting Started?
Quote:
but as I have written in the requirement
Do you want to PM me a billing address?
Back to top
View user's profile Send private message
abhishekmdwivedi

New User


Joined: 22 Aug 2006
Posts: 95
Location: india

PostPosted: Mon May 04, 2009 11:06 am    Post subject: Reply to: Can DFSORT be helpful for this requirement.
Reply with quote

Quote:
Again yes. Have you looked at z/OS V1R10.0 DFSORT: Getting Started?


Thanks a lot. I'll look into the manuals for the answers.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon May 04, 2009 11:10 pm    Post subject:
Reply with quote

abhishekmdwivedi,

Here is an idea. This will increase the refid everytime the job runs.

Create 2 80 byte FB recfm format. file 1 will have the Run number you want to pass to the job. And file 2 will refid.(to begin have 1)

Populate the above defined file with this

let us say this filename1 is userid.RN.sym
Code:

RN,C'02'


let us say this filename1 is userid.REFID.sym
Code:

REFID,C'000000000000000001'


This job will increment the REFID everytime it runs and if the input file is empty then it will set a return code of 4 and will NOT increment the Refid.


Code:

//STEP0100 EXEC PGM=SORT                     
//SYSOUT   DD SYSOUT=*                       
//SYMNAMES DD DSN=userid.RN.sym,           
//            DISP=SHR 
//         DD DSN=userid.REFID.sym,           
//            DISP=SHR                     
//SORTIN   DD DSN=Your 133 byte input file,           
//            DISP=SHR                       
//SORTOUT  DD DSN=your 1 record file for external use,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(1,1),RLSE)
//REFID    DD DSN=userid.REFID.sym,
//            DISP=SHR   
//SYSIN    DD *                               
  SORT FIELDS=COPY                                         
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(134:SEQNUM,8,ZD,REFID)),
  IFTHEN=(WHEN=(134,8,ZD,EQ,1),                           
  OVERLAY=(142:+1,ADD,142,18,ZD,M11,LENGTH=18))           
                                                           
  OUTFIL REMOVECC,NODETAIL,                               
  TRAILER1=(COUNT=(M11,LENGTH=10),X,RN,                   
            DATENS=(YMD),X,TIME,X,REFID,X,                 
            C'INTERFACE NAME',133:X)
                       
  OUTFIL FNAMES=REFID,ENDREC=1,                           
  BUILD=(C'REFID,C''',142,18,C'''',80:X)                   
/*
Back to top
View user's profile Send private message
abhishekmdwivedi

New User


Joined: 22 Aug 2006
Posts: 95
Location: india

PostPosted: Tue May 05, 2009 3:46 pm    Post subject: Reply to: Can DFSORT be helpful for this requirement.
Reply with quote

Sorry I was not able to reply to this earlier in the day. Was tuning up few things in the code as per my requirement.

This is working fine for me.

Thanks a lot for this Skolusu. Appreciate your help. icon_biggrin.gif
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 Formatting using DFsort Guru Nandu DFSORT/ICETOOL 5 Thu Nov 30, 2017 7:33 am
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 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