Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Insert a one record dynamically

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

New User


Joined: 05 Sep 2008
Posts: 37
Location: Chennai

PostPosted: Sat Nov 08, 2008 1:58 am    Post subject: Insert a one record dynamically
Reply with quote

I am creating a file in second step . In that file I need to put '00000000' in position 9,8 in next step.
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 Nov 08, 2008 3:09 am    Post subject:
Reply with quote

Hello,

You need to better describe your request.

Post some input and the output you want to be created when that input is processed.

Mention the recfm and lrecl of both files.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Sat Nov 08, 2008 11:36 am    Post subject: Reply to: Insert a one record dynamically
Reply with quote

Jeya,

Quote:
In that file I need to put '00000000' in position 9,8 in next step.


After the second step, add a SORT step to OVERLAY the data from col 9 of length 8.

As suggested, post few more details of the file. Is that a VB or FB? What actually are you doing with that file in the 3rd step?
Back to top
View user's profile Send private message
jeyaseelan347
Warnings : 1

New User


Joined: 05 Sep 2008
Posts: 37
Location: Chennai

PostPosted: Mon Nov 10, 2008 8:31 pm    Post subject:
Reply with quote

Hi,

I am creating one new file. I need to add below record to that file,
' 00000000 '
The LRECL is 24 and recfm is VB. I will read the file in the next step which will execute a application program.

I need to avoid 'file is empty' error that's the reason I need to a record.

Thanks,
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Nov 10, 2008 10:33 pm    Post subject:
Reply with quote

Chennai,

Here's a DFSORT job that will do what I think you asked for. You said you wanted the constant in position 9, but I assumed you were not counting the RDW, so it would really be position 13. (If you were counting the RDW, then change 9: to 5:).

Code:

//S1    EXEC  PGM=ICEMAN                                           
//SYSOUT    DD  SYSOUT=*                                           
//SORTIN DD DSN=...  input file (VB/24)                               
//SORTOUT DD DSN=...  output file (VB/24)     
//SYSIN    DD    *                                                 
  OPTION COPY                                                       
  OUTFIL REMOVECC,                                                 
    TRAILER1=(9:C'00000000')                                       
/*
Back to top
View user's profile Send private message
jeyaseelan347
Warnings : 1

New User


Joined: 05 Sep 2008
Posts: 37
Location: Chennai

PostPosted: Mon Nov 10, 2008 11:09 pm    Post subject:
Reply with quote

Thanks Frank.
This is working fine. But both my input file and output file are same. So is there any way to use Dummy file in SORTIN and use this file in sortout?
I tried the same but i am getting below error

ICE043A 3 INVALID DATA SET ATTRIBUTES SPECIFIED SORTIN RECFM

I suppose, I am getting this because of no DCB attributes in Dummy file. Is there any way to fix it up?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Nov 10, 2008 11:22 pm    Post subject:
Reply with quote

I don't understand. You say the input file and output file are the same, but then you ask if you can use a DUMMY file for SORTIN. That makes no sense. What does your input file look like? What do you want the output file to look like? Using the same file for input and output is NOT a good idea.
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: Tue Nov 11, 2008 12:34 am    Post subject:
Reply with quote

Hi Frank,

I believe the requirement is to generate a single-record output file with the zeros as the only record. . .
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Nov 11, 2008 12:41 am    Post subject:
Reply with quote

Quote:
I believe the requirement is to generate a single-record output file with the zeros as the only record. . .


Well, if there's no input file, and we just have to generate an output file containing one record with zeros, this would do it:

Code:

//S1    EXEC  PGM=ICEMAN                                             
//SYSOUT    DD  SYSOUT=*                                             
//SORTIN DD DUMMY,RECFM=VB,LRECL=24,BLKSIZE=28                       
//SORTOUT DD DSN=...  output file (VB/24)     
//SYSIN    DD    *                                                   
  OPTION COPY                                                       
  OUTFIL REMOVECC,                                                   
    TRAILER1=(9:C'00000000')                                         
Back to top
View user's profile Send private message
jeyaseelan347
Warnings : 1

New User


Joined: 05 Sep 2008
Posts: 37
Location: Chennai

PostPosted: Tue Nov 11, 2008 1:20 am    Post subject:
Reply with quote

Thanks Frank
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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us