Joined: 11 Apr 2005 Posts: 42 Topics: 19 Location: India
Posted: Thu Jul 14, 2005 1:41 pm Post subject: Building Control Card Dynamically
Hi,
I have file say ABC.CONTROL.FILE which contains one record with the timestamp in YYYYMMDDHHMMSS format as its first field. The record in all is 28 bytes long.
The layout of this file is:
Problem Statement:
Using this file I need to build a FTP control card which contains 7 records. Here is a sample FTP control card:
Record1 contains IP Address : 11.22.33.44
Record2 contains user Id : used_Id
Record3 contains Passcode : Pass_Code_abc
Record4 contains Format : ASCII
Record5 contains FTP statement : PUT 'ABC.CONTROL.FILE' em_Timestamp.dat
Record6 contains FTP command : CLOSE
Record7 contains FTP command : QUIT
Now, in the Record 5 of the control card, the timestamp field from the ABC.CONTROL.FILE is to be populated to build the name of the destination file [basically, its the name of ABC.CONTROL.FILE on the server with IP mentioned in the control card]. ONLY the timestamp field needs to be changed, all the other fields in the FTP card remain as they are.
ABC.CONTROL.FILE is created once everyday. Therefore the Control card all needs to be created everyday (with the new destination file name, from the timestamp field in the control file).
Could you please help me achieve this using SYNCSORT?
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Thu Aug 18, 2005 8:14 am Post subject:
Quote:
In the solution given by you above, where are we updating the existing control card. Please consider that the control card will be a member in a PDS.
Heman,
You can use the same pds member to do an update in place but , if something goes wrong you will loose the original data. So it is always a good idea to create a create temporary dataset with the changes and then replace the input with the temp dataset.
In other topic of yours I posted a solution to create dynamic control cards.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum